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