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