#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  int x, s;
  int d = 0;
  while (n--) {
    cin >> x;
    s = 86400 - x;
    t -= s;
    d++;
    if (t <= 0) break;
  }
  cout << d;
  return 0;
}
