#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  int cnt = 0;
  while (t > 0) {
    int a;
    cin >> a;
    cnt++;
    t -= (86400 - a);
  }
  cout << cnt;
}
