#include <bits/stdc++.h>
using namespace std;
const int day = 86400;
int N, T, spt[102];
void readin() {
  cin >> N >> T;
  for (int i = 1; i <= N; ++i) {
    cin >> spt[i];
  }
}
void process() {
  for (int i = 1; i <= N; ++i) {
    T -= day - spt[i];
    if (T <= 0) {
      cout << i << endl;
      return;
    }
  }
}
int main() {
  readin();
  process();
  return 0;
}
