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