#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, ans = 0;
  scanf("%d%d", &n, &t);
  vector<int> v;
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    v.push_back(86400 - x);
  }
  for (int i = 0, sum = 0; i < n; ++i) {
    sum += v[i];
    if (sum >= t) return 0 * printf("%d", i + 1);
  }
  return 0;
}
