#include <bits/stdc++.h>
using namespace std;
int n, t;
int tmp;
int day = 0;
int main() {
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    day++;
    scanf("%d", &tmp);
    t -= 86400 - tmp;
    if (t <= 0) break;
  }
  cout << day << endl;
  return 0;
}
