#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const double PI = acos(-1.0);
int32_t main() {
  long long n, t;
  cin >> n >> t;
  long long a[n];
  long long cur = 0, ans = INT_MAX;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    cur += 86400 - a[i];
    if (cur >= t) {
      ans = min(ans, i + 1);
    }
  }
  cout << ans << '\n';
  return 0;
}
