#include <bits/stdc++.h>
using namespace std;
const int N = 2e4;
long long GCD(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return GCD(b, a % b);
  }
}
bool yoyo(const pair<long long, long long> p1,
          const pair<long long, long long> p2) {
  return p1.first < p2.first;
}
int main() {
  long long t, n, m, q, i, j, k, a, a1, a2, b1, b2;
  cin >> n >> t;
  vector<long long> v1;
  for (i = 0; i < n; i++) {
    cin >> a;
    v1.push_back(a);
  }
  long long ind = 1;
  i = 0;
  while (i < n) {
    long long rem = 86400 - v1[i];
    if (rem >= t) {
      ind = i + 1;
      break;
    } else {
      t -= rem;
    }
    i++;
  }
  cout << ind;
  return 0;
}
