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