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