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