#include <bits/stdc++.h>
using namespace std;
template <class A>
ostream& operator<<(ostream& out, const vector<A>& v) {
  for (long long i = 0; i < v.size(); i++) {
    if (i) out << " ";
    out << v[i];
  }
  return out << '\n';
}
const long long mod = 1000000007;
inline long long add(long long a, long long b) {
  a += b;
  if (a >= mod) a -= mod;
  return a;
}
inline long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) a += mod;
  return a;
}
inline long long mul(long long a, long long b) { return (a * 1ll * b) % mod; }
inline long long powmod(long long a, long long b) {
  long long rt = 1;
  while (b > 0) {
    if (b & 1) rt = mul(rt, a);
    a = mul(a, a);
    b >>= 1;
  }
  return rt;
}
inline long long inv(long long a) { return powmod(a, mod - 2); }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long n, k;
long long a[100005];
void solve() {
  long long n, t;
  cin >> n >> t;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (false) cerr << t << " " << x << '\n';
    t -= (86400 - x);
    if (false) cerr << t << " ";
    if (t <= 0) {
      cout << i + 1 << '\n';
      return;
    }
  }
  cout << n << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL),
      cout << setprecision(14);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
}
