#include <bits/stdc++.h>
using namespace std;
int time1 = 86400;
int n, t;
vector<int> arr(1e5);
void solve() {
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (t > 0) {
      ans++;
      t -= time1 - arr[i];
    }
  }
  cout << ans << endl;
}
int main() {
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  solve();
  return 0;
}
