#include <bits/stdc++.h>
using namespace std;
const int dd = 86400;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, t;
  cin >> n >> t;
  int sol = 0;
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    sol += dd - a;
    if (sol >= t) {
      cout << i << '\n';
      return 0;
    }
  }
}
