#include <bits/stdc++.h>
using namespace std;
const int OO = 0x3f3f3f3f, N = 2e5 + 5, mod = 1e9 + 7;
const double BI = acos(-1), EPS = 1e-12;
int n, arr[N], mn = OO;
long long t, sum, ans;
set<int> idx;
int main() {
  scanf("%d%lld", &n, &t);
  for (int i = 0; i < n; ++i) {
    scanf("%d", arr + i);
    sum += arr[i];
    idx.insert(i);
  }
  while (idx.size()) {
    ans += t / sum * idx.size();
    t -= t / sum * sum;
    vector<int> tmp;
    long long hv = 0;
    for (auto i : idx) {
      if (hv + arr[i] > t)
        tmp.push_back(i), sum -= arr[i];
      else
        hv += arr[i];
    }
    for (int go : tmp) idx.erase(go);
  }
  printf("%lld", ans);
  return 0;
}
