#include <bits/stdc++.h>
using namespace std;
long long a[200020];
long long n, m, t, ans;
int main() {
  scanf("%I64d %I64d", &n, &t);
  long long inf = 0x7fffff;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    inf = min(inf, a[i]);
  }
  while (t >= inf) {
    long long s = 0, d = 0;
    for (int i = 1; i <= n; i++)
      if (t >= a[i]) {
        t -= a[i];
        s++;
        d += a[i];
      }
    ans += s + t / d * s;
    t %= d;
  }
  printf("%lld\n", ans);
  return 0;
}
