#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  int a[101];
  cin >> n >> t;
  int rest = t;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    rest -= (86400 - a[i]);
    if (rest <= 0) {
      cout << i + 1;
      return 0;
    }
  }
}
