#include <bits/stdc++.h>
using namespace std;
int static_init = []() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout << fixed;
  return 0;
}();
constexpr int N = 2e5;
int32_t n, a[N];
bool v[N];
int main() {
  int64_t t, ans = 0;
  cin >> n >> t;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (;;) {
    int64_t s = 0;
    int m = 0;
    for (int i = 0; i < n; i++) {
      if (v[i]) continue;
      if (s + a[i] > t)
        v[i] = true;
      else
        s += a[i], m++;
    }
    if (m == 0) break;
    ans += t / s * m;
    t %= s;
  }
  cout << ans << endl;
  return 0;
}
