#include <bits/stdc++.h>
using namespace std;
int main() {
  int number_days, work, days = 0;
  long long time_read, time = 0LL;
  bool flag = 0;
  cin >> number_days >> time_read;
  for (int i = 0; i < number_days; i++) {
    cin >> work;
    time += (86400 - work);
    if (!flag && time >= time_read) {
      days++;
      flag = 1;
    } else if (!flag)
      days++;
  }
  cout << days << endl;
}
