#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
inline int read() {
  char c = getchar();
  int x = 0, f = 1;
  for (; c > '9' || c < '0'; c = getchar())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; c = getchar())
    x = (x << 1) + (x << 3) + (c ^ 48);
  return x * f;
}
long long ans, sum, sum_;
int a[maxn], n, s;
void djj_lxy() {
  n = read(), scanf("%lld", &sum);
  for (register int i = 1; i <= n; i++) a[i] = read();
  for (; sum > 0;) {
    s = 0, sum_ = 0;
    for (register int i = 1; i <= n; i++) {
      if (sum_ + a[i] <= sum) sum_ += a[i], s++;
      if (sum_ == sum) break;
    }
    if (s == 0) break;
    ans += sum / sum_ * s;
    sum %= sum_;
  }
  printf("%lld\n", ans);
}
int main() { djj_lxy(); }
