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