#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long long mod = 1e9 + 7;
const long long inf = -1e18;
const long long INF = 1e18;
long long n, t, a[N], ans, ians;
int main() {
  cin >> n >> t;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    ans += 86400 - a[i];
    if (ans >= t && ians == 0) {
      ians = i;
    }
  }
  cout << ians;
  return 0;
}
