#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1000000007;
const int N = 500000 + 7;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, t;
  int cur = 0;
  cin >> n >> t;
  int day = 1;
  while (true) {
    int temp;
    cin >> temp;
    cur += 86400 - temp;
    if (cur >= t) {
      cout << day << endl;
      return 0;
    }
    day++;
  }
  return 0;
}
