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