#include <bits/stdc++.h>
using namespace std;
int a[200005];
queue<int> q;
int main() {
  int n;
  long long all;
  long long sum = 0;
  scanf("%d %I64d", &n, &all);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
    q.push(a[i]);
  }
  int l = n;
  long long ans = 0;
  while (sum > 0 && all > 0) {
    ans += (all / sum) * l;
    all %= sum;
    while (all < sum && sum > 0) {
      int t = q.front();
      q.pop();
      if (t <= all) {
        ans++;
        all -= t;
        q.push(t);
      } else {
        l--;
        sum -= t;
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
