#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int n, m;
pair<int, int> a[200];
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  for (int i = 1; i <= n; i++) {
    m -= (86400 - a[i].first);
    if (m <= 0) {
      cout << i << "\n";
      exit(0);
    }
  }
  exit(0);
}
