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