#include <bits/stdc++.h>
using namespace std;
int main() {
  long t, n, c = 0, a;
  cin >> n >> t;
  for (int i = 0; i < n && t > 0; i++) {
    cin >> a;
    t -= (86400 - a);
    c++;
  }
  cout << c << endl;
}
