#include <bits/stdc++.h>
int main() {
  int days, time, count, free;
  int x = 0;
  scanf("%d", &days);
  scanf("%d", &time);
  int busyTime[days];
  for (x = 0; x < days; x++) {
    scanf("%d", &busyTime[x]);
  }
  count = 0;
  while (time > 0) {
    free = 86400 - busyTime[count];
    time -= free;
    count++;
  }
  printf("%d", count);
}
