#include <bits/stdc++.h>
using namespace std;
const long long N = 3e6;
const long long INF = 1e9 + 1;
const long long mod = 1e9 + 7;
long long n, m, cnt, x, y, a[N];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> x;
    m -= 86400 - x;
    if (m <= 0) return cout << i + 1, 0;
  }
}
