#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int main() {
  long long n, t;
  cin >> n >> t;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long time = 0;
  long long i;
  for (i = 1; i <= n; i++) {
    time = time + 86400 - a[i - 1];
    if (time >= t) break;
  }
  cout << i << "\n";
}
