#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=0;
string s;
while(cin>>s)
{
n++;
if(s=="250"){cout<<n;break;}
}
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=0;
string s;
while(cin>>s)
{
n++;
if(s=="250"){cout<<n;break;}
}
}