#include <bits/stdc++.h>
using namespace std;
string en = "\n";
string sp = " ";
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  vector<long long int> arr(n);
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  long long int ans = 0;
  long long int counter = 0;
  for (long long int i = 0; i < n; i++) {
    counter++;
    ans = ans + 86400 - arr[i];
    if (ans >= k) break;
  }
  cout << counter << endl;
  return 0;
}
