#include<iostream>
#include<fstream>
#include<vector>
#include<string>
using namespace std;
int main()
{
int Num = 0;
char b;
ifstream f("abc.txt");
vector<string> vs;
for (string a; f >> a;)
vs.push_back(a);
for (int i = 0; i < vs.size() - 1; ++i){
if (vs[i] == "25"){
b = vs[i+1].back();
if (b == '*') Num += 2;
else Num++;
}
}
cout << Num << "\n";
f.close();
system("pause");
return 0;
}