#include <bits/stdc++.h>
using namespace std;
int a, b, c, e, s, n;
int x[1000006];
int y[1000005];
int main() {
  cin >> a;
  cin >> b;
  for (int i = 1; i <= a; i++) {
    cin >> x[i];
  }
  for (int i = 1; i <= a; i++) {
    b = b - 86400 + x[i];
    if (b <= 0) {
      cout << i;
      break;
    }
  }
}
