#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, c = 0, ans;
  bool b = 0;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (!b && c + 86400 - x >= t) {
      b = 1;
      ans = i + 1;
    } else
      c += (86400 - x);
  }
  cout << ans;
  return 0;
}
