#include <bits/stdc++.h>
using namespace std;
const int N = 1000000 + 7;
int n, A[N], tot;
long long T, t, Now, Ans;
int main() {
  scanf("%d%lld", &n, &T);
  for (int i = (1), iLimit = (n); i <= iLimit; (++(i)))
    scanf("%lld", A + i), Now += A[i], (++(tot));
  while (Now) {
    if (T >= Now)
      Ans += (T / Now) * tot, T -= (T / Now) * Now;
    else
      for (int i = (1), iLimit = (n); i <= iLimit; (++(i)))
        if (T >= A[i]) T -= A[i], (++(Ans));
    Now = 0, tot = 0, t = T;
    for (int i = (1), iLimit = (n); i <= iLimit; (++(i)))
      if (t >= A[i]) t -= A[i], (++(tot)), Now += A[i];
  }
  printf("%lld", Ans);
  return 0;
}
