#include <iostream>
using namespace std;
int v [100000];
int main ()
{
int i, x,j,n, m;
m=0;
i=0;
n=0;
cin>>x
while (x!=0)
{
v[i]=x;
if(m<x )
m=x;
i++;
cin>>x;
}
for (j=1;j <=i;j++)
if (v [i]==m)
n=n+1;
cout <<"nr maxim este"<<m <<"si apare de "<<n<<" ori";
return 0;
}