#include <bits/stdc++.h>
int main() {
  int n, i, t;
  int a[101] = {0};
  scanf("%d%d", &n, &t);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    t = t - 86400 + a[i];
    if (t <= 0) break;
  }
  printf("%d\n", i);
}
