#include <bits/stdc++.h>
using namespace std;
const int dirx[] = {0, 1, 0, -1};
const int diry[] = {1, 0, -1, 0};
inline void debugMode() {}
int n, m, first, t, ti;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> t;
  for (int i = 1; i <= n; i++) {
    cin >> first;
    ti += (86400 - first);
    if (ti >= t) return cout << i, 0;
  }
  return 0;
}
