#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int w = 0, x = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    w |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return w ? -x : x;
}
int main() {
  int n = read();
  long long T;
  scanf("%lld", &T);
  vector<int> a(n);
  long long sum = 0;
  for (register int i(0); i <= n - 1; ++i) a[i] = read(), sum += a[i];
  long long ans = 0;
  while (a.size()) {
    long long tmp = T / sum;
    ans += tmp * a.size();
    T %= sum;
    sum = 0;
    vector<int> Tmp;
    for (int i = 0; i < (int)a.size(); i++) {
      if (T < a[i]) continue;
      T -= a[i], ++ans, sum += a[i];
      Tmp.push_back(a[i]);
    }
    a = Tmp;
  }
  printf("%lld\n", ans);
  return 0;
}
