#include <bits/stdc++.h>
using namespace std;
int times[105];
int main() {
  int n, m;
  int ans = 0;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &times[i]);
  }
  for (int i = 1; i <= n; i++) {
    ans++;
    m -= (86400 - times[i]);
    if (m <= 0) {
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
