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