#include <bits/stdc++.h>
using namespace std;
long long t[600000], a[300000], start = 1, T, ans, n;
void update(long long x, long long d) {
  x += start;
  t[x] = d;
  x /= 2;
  while (x) {
    t[x] = t[2 * x] + t[2 * x + 1];
    x /= 2;
  }
}
long long get(long long node, long long tl, long long tr, long long l,
              long long r) {
  if (r < tl || tr < l) return 0;
  if (l <= tl && tr <= r) return t[node];
  long long tm = (tl + tr) / 2;
  return get(2 * node, tl, tm, l, r) + get(2 * node + 1, tm + 1, tr, l, r);
}
int main() {
  cin >> n >> T;
  while (start < n) start <<= 1;
  for (long long i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    update(i, a[i]);
  }
  long long cnt = n;
  while (cnt) {
    long long sum = get(1, 0, start - 1, 0, n - 1);
    ans += (T / sum) * cnt;
    T -= (T / sum) * sum;
    long long l = -1, r = n - 1;
    while (l < r) {
      long long mid = (l + r + 1) / 2;
      if (get(1, 0, start - 1, 0, mid) <= T)
        l = mid;
      else
        r = mid - 1;
    }
    update(l + 1, 0);
    cnt--;
  }
  cout << ans;
}
