#include <bits/stdc++.h>
using namespace std;
inline int res(int b, int x) {
  if ((b - x) % 100 == 0)
    return (b - x) / 100;
  else
    return (b - x) / 100 + 1;
}
int main() {
  int n, x, y;
  cin >> n >> x >> y;
  vector<int> b(475), a(475);
  int k = 0;
  a[0] = 0;
  b[0] = y < 49 ? y : 0;
  for (int i = 1; i < 475; i++) {
    k = (k * 96 + 42) % 475;
    a[i] = k;
    b[i] = k * 50;
  }
  vector<int>::iterator it;
  it = find(a.begin(), a.end(), n - 26);
  int j = it - a.begin();
  int min = 100000, l = 0;
  for (int i = (j + 475 - 25) % 475, k = 0; k < 25; k++, i = (i + 1) % 475) {
    if (b[i] >= y && (b[i] - x) < min) {
      min = (b[i] - x);
      l = i;
    }
  }
  if (b[l] <= x)
    cout << 0;
  else
    cout << res(b[l], x);
  return 0;
}
