#include <bits/stdc++.h>
using namespace std;
const int adj[8][2] = {{-1, 0},  {0, -1}, {1, 0}, {0, 1},
                       {-1, -1}, {-1, 1}, {1, 1}, {1, -1}};
const long long int LLINF = 1e18;
const int INF = 1e9;
const long long int MOD = 1e9 + 7;
const double EPS = 1e-10;
const int SIZE = 512;
int N, K;
int MN, M;
int main() {
  M = 20 * 60;
  MN = 24 * 60;
  scanf("%d %d", &N, &K);
  int ans = 0;
  for (int i = 1; i <= N; i++) {
    int temp = i * 5;
    if (M + temp + K > MN) break;
    ans++;
    M += temp;
  }
  printf("%d\n", ans);
  return 0;
}
