#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5;
int n;
long long T;
deque<int> q;
int main() {
  scanf("%d%lld", &n, &T);
  for (int i = 1, a; i <= n; ++i) scanf("%d", &a), q.push_back(a);
  long long ans = 0;
  while (q.size()) {
    int mx = 0;
    long long sum = 0;
    for (auto u : q) mx = max(mx, u), sum += u;
    if (T >= mx) ans += ((T - mx) / sum) * q.size(), T = (T - mx) % sum + mx;
    int sz = q.size();
    while (sz--) {
      int a = q.front();
      q.pop_front();
      if (a <= T) ++ans, T -= a;
      if (a <= T) q.push_back(a);
    }
  }
  printf("%lld\n", ans);
  return 0;
}
