#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, a, i;
  cin >> n >> t;
  for (i = 1; i <= n; i++) {
    cin >> a;
    t -= (86400 - a);
    if (t <= 0) break;
  }
  cout << i << endl;
  return 0;
}
