#include <bits/stdc++.h>
using namespace std;
bool isSubSequence(string str1, string str2, int m, int n) {
  int j = 0;
  for (int i = 0; i < n && j < m; i++) {
    if (str1[j] == str2[i]) j++;
  }
  return (j == m);
}
int isPrime(long long n) {
  for (int i = 2; i < sqrt(n); i++)
    if (n % i == 0) return 0;
  return 1;
}
int isSquare(long long n) { return (long long)sqrt(n) * (sqrt(n)) == n; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int t, i, x, j = 0, n, m, k = 0;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    cin >> x;
    t -= (86400 - x);
    if (t <= 0) return cout << i + 1, 0;
  }
  return 0;
}
