#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n, t;
int a[N];
int main() {
  scanf("%d%d", &n, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    a[i] = 86400 - a[i];
  }
  int ans = 1;
  while (t - a[ans] > 0) {
    t -= a[ans++];
  }
  printf("%d\n", ans);
}
