#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  int day = 1;
  cin >> n >> t;
  while (n--) {
    int num;
    cin >> num;
    t -= 86400 - num;
    if (t <= 0)
      break;
    else
      day++;
  }
  cout << day;
  return 0;
}
