#include <bits/stdc++.h>
using namespace std;
long long a[200010];
long long ans, n, t, minn;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n >> t;
  minn = 0x3f3f3f;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    minn = min(a[i], minn);
  }
  while (t >= minn) {
    long long k = 0;
    long long s = 0;
    for (int i = 0; i < n; i++) {
      if (t >= a[i]) {
        t -= a[i];
        s++;
        k += a[i];
      }
    }
    ans += s + t / k * s;
    t = t % k;
  }
  cout << ans << endl;
  return 0;
}
