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