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