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