#include <bits/stdc++.h>
int candy[200021];
int next[200021];
int main() {
  long long n, i, t, loopans, loopn, minprice = 1145141919, ans = 0, now, prev;
  scanf("%I64d%I64d", &n, &t);
  loopans = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &candy[i]);
    loopans += candy[i];
    if (candy[i] < minprice) minprice = candy[i];
    next[i] = i + 1;
  }
  next[n] = n;
  next[n + 1] = 0;
  if (t > loopans) {
    ans = t / loopans;
    ans *= n;
    t %= loopans;
  }
  now = 0;
  loopans = 0;
  loopn = 0;
  prev = n + 1;
  while (t >= minprice) {
    if (t >= candy[now]) {
      t -= candy[now];
      ans += 1;
      loopn += 1;
      loopans += candy[now];
      prev = now;
    } else {
      if (prev < n)
        next[prev] = next[now];
      else
        next[n + 1] = next[now];
    }
    now = next[now];
    if (now == n) {
      prev = n + 1;
      now = next[n + 1];
      if (t > loopans && loopn > 0) {
        ans += (t / loopans) * loopn;
        t %= loopans;
      }
      loopn = 0;
      loopans = 0;
    }
  }
  printf("%I64d", ans);
  return 0;
}
