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