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