#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, sum = 0, i = 0;
  cin >> n >> t;
  int a[n];
  while (n > 0 && sum < t) {
    cin >> a[i];
    sum += 86400 - a[i];
    i++;
    n--;
  }
  cout << i;
  return 0;
}
