#include <bits/stdc++.h>
using namespace std;
void swapll(long long *a, long long *b) {
  long long tmp = *a;
  *a = *b;
  *b = tmp;
}
void swapc(char *a, char *b) {
  char tmp = *a;
  *a = *b;
  *b = tmp;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, t;
  cin >> n;
  cin >> t;
  vector<long long> v(n, 0);
  for (long long i = 0; i < n; i++) cin >> v[i];
  ;
  long long count = 0;
  for (long long i = 0; i < n; i++) {
    t -= (86400 - v[i]);
    count++;
    if (t <= 0) {
      break;
    }
  }
  cout << count << endl;
  return 0;
}
