#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, t;
  cin >> n >> t;
  long long int a[n + 1];
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) cin >> a[i], sum += a[i];
  long long int ans = n * (t / sum);
  t = t % sum;
  while (1) {
    long long int ctr = 0, f = 0;
    for (long long int i = 0; i < n; i++)
      if (a[i] <= t) {
        f += a[i];
        ctr++;
        t -= a[i];
      } else
        a[i] = LLONG_MAX;
    if (ctr == 0) break;
    t += f;
    ans += (t / f) * ctr;
    t = t % f;
  }
  cout << ans << endl;
  return 0;
}
