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