#include <bits/stdc++.h>
using namespace std;
int p,x,y,i;
int luc(int s){
s = (s/50)%475;
for (int i=0;i<25;i++)
if((s=(s*96+42)%475)+26==p)return 1;
return 0;
}
int main(){
cin>>p>>x>>y;
for(i=x%50;!luc(i)||i<y;i+=50){}
return cout<<(i<=x?0:(i-x+99)/100),0;
}