#include<iostream>
#include<algorithm>
using namespace std;
int check(int n, int marks[]) {
int* x = std::max_element(marks,marks+5);
int bonus = 100-(int)(*x);
int c = 0;
for(int i=0;
i<n;i++) {
if(marks[i] + bonus >= 50) c += 1;
}
return c;
}
int main() {
int n = 5;
int marks[] = {0, 21, 83, 45, 64};
cout<<check(n, marks)<<endl;
return 0;
}