#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, p = 0, c = 0, l;
  long long int i, n, k;
  cin >> n >> t;
  long long int a[200001];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    p += a[i];
    if (i == 0)
      k = a[i];
    else
      k = min(k, a[i]);
  }
  c = t / p * n;
  t = t % p;
  while (t >= k) {
    long long int d = 0, e = 0;
    for (i = 0; i < n; i++) {
      if (t >= a[i]) {
        t -= a[i];
        d++;
        e += a[i];
      }
    }
    c = c + d + t / e * d;
    t %= e;
  }
  cout << c;
}
