#include <bits/stdc++.h>
using namespace std;
long long n, m, i, sum, num, ans, qs, a[200001];
int main() {
  scanf("%lld%lld", &n, &m);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  while (1) {
    sum = num = 0ll;
    for (i = 1; i <= n; i++)
      if (sum + a[i] <= m) {
        sum += a[i];
        num++;
      }
    if (!num) break;
    qs = m / sum;
    ans += qs * num;
    m -= qs * sum;
  }
  printf("%lld", ans);
}
