#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, cnt = 0;
  bool f = true;
  cin >> n >> t;
  for (int i = 0, x; i < n; i++) {
    cin >> x;
    cnt += 86400 - x;
    if (f && cnt >= t) {
      cout << i + 1 << endl;
      f = false;
    }
  }
}
