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