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