#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int a[maxn];
int main() {
  int n, t;
  while (cin >> n >> t) {
    for (int i = 0; i < n; i++) cin >> a[i], a[i] = 86400 - a[i];
    int sum = 0;
    for (int i = 0; i < n; i++) {
      sum += a[i];
      if (sum >= t) {
        cout << i + 1 << endl;
        break;
      }
    }
  }
  return 0;
}
