#include <bits/stdc++.h>
using namespace std;
int main() {
  int p, x, y;
  while (cin >> p >> x >> y) {
    int new_x = x - (x - y) / 50 * 50;
    int mine = new_x;
    int i;
    bool flag = false;
    for (i = new_x;; i += 50) {
      int temp = (i / 50) % 475;
      for (int j = 0; j < 25; j++) {
        temp = (temp * 96 + 42) % 475;
        if (temp + 26 == p) {
          flag = true;
          break;
        }
      }
      if (flag) break;
    }
    if (i < x) {
      cout << 0 << endl;
    } else if (i >= x) {
      if ((i - x) % 100 == 0)
        cout << (i - x) / 100 << endl;
      else
        cout << (i - x) / 100 + 1 << endl;
    }
  }
  return 0;
}
