#include <bits/stdc++.h>
using namespace std;
void solve() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, t, c = 0;
  cin >> n >> t;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int j = 0; j < n; j++) {
    c++;
    t -= (86400 - a[j]);
    if (t <= 0) break;
  }
  cout << c << "\n";
}
int main() {
  solve();
  return 0;
}
