#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000009;
const int MX = 100005;
const double EPS = 1e-9;
const int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, t;
  cin >> n >> t;
  int a[n + 2];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    t -= (86400 - a[i]);
    if (t <= 0) {
      cout << i + 1 << '\n';
      break;
    }
  }
  return 0;
}
