#include <bits/stdc++.h>
using namespace std;
int Find(int);
void Merge(int, int);
int findSize(int);
vector<int> vec;
vector<int> Size(100000, 1);
vector<int> Rank(100000, 0);
void combinationList(int[], int[], int, int, int, int);
int main() {
  int n, t, i, index;
  cin >> n >> t;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] <= 86400) {
      t = t - (86400 - a[i]);
    }
    if (t <= 0) {
      index = i;
      break;
    }
  }
  cout << index + 1 << endl;
}
void combinationList(int arr[], int data[], int len, int start, int dataLength,
                     int arrLength) {
  int i, j, result;
  if (len == 0) {
    result = 0;
    for (j = 0; j < dataLength; j++) {
      result = result + data[j];
    }
    cout << result << " ";
  }
  for (i = start; i <= arrLength - len; i++) {
    if (len >= 1) {
      data[dataLength - len] = arr[i];
      combinationList(arr, data, len - 1, i + 1, dataLength, arrLength);
    }
  }
}
int Find(int n) {
  if (vec[n] == n) return n;
  return vec[n] = Find(vec[n]);
}
void Merge(int a, int b) {
  int x, y;
  x = Find(a);
  y = Find(b);
  if (Rank[x] > Rank[y]) {
    vec[y] = x;
    Size[x] = Size[x] + Size[y];
  } else if (Rank[x] < Rank[y]) {
    vec[x] = y;
    Size[y] = Size[y] + Size[x];
  } else {
    vec[y] = x;
    Rank[x]++;
    Size[x] = Size[x] + Size[y];
  }
}
int findSize(int n) { return Size[Find(n)]; }
