#include <iostream>
using namespace std;
int main() {
long long mas[4];
cin >> mas[0] >> mas[1] >> mas[2] >> mas[3];
int sum = 0;
for (int i = 0; i < 4; i++) {
if (mas[i] > 7) {
sum++;
}
cout << sum;
return 0;
#include <iostream>
using namespace std;
int main() {
long long mas[4];
cin >> mas[0] >> mas[1] >> mas[2] >> mas[3];
int sum = 0;
for (int i = 0; i < 4; i++) {
if (mas[i] > 7) {
sum++;
}
}
cout << sum;
return 0;
}