#include <bits/stdc++.h>
using namespace std;
int main() {
  int days, timeneeded;
  cin >> days;
  int arr[100];
  cin >> timeneeded;
  for (int i = 0; i < days; i++) {
    int j;
    cin >> j;
    arr[i] = 86400 - j;
  }
  int max1 = 0;
  int counter = 0;
  int f = 0;
  while (max1 < timeneeded) {
    counter += 1;
    max1 = max1 + arr[f];
    f = f + 1;
  }
  cout << counter;
}
