#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, a[101];
  cin >> n >> x;
  for (int j = 0; j < n; j++) {
    cin >> a[j];
    a[j] = 86400 - a[j];
  }
  int l = 0, r = 0;
  int curr = 0;
  while (r < n && curr < x) {
    curr += a[r];
    r++;
  }
  cout << r << endl;
  return 0;
}
