#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void in(register T& a) {
  register char c = getchar();
  register T x = 0, f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  a = x * f;
}
long long n, t, ans, a[200];
int main() {
  in(n);
  in(t);
  for (register int i = 1; i <= n; i++) in(a[i]);
  for (register int i = 1; i <= n; i++) {
    ans += 86400 - a[i];
    if (ans >= t) {
      printf("%d", i);
      return 0;
    }
  }
}
