#include <bits/stdc++.h>
using namespace std;
long long A[200006], S, cur, n, T, res;
bool last;
int main() {
  cin >> n >> T, cur = n;
  for (long long i = 0; i < n; ++i) scanf("%d", &A[i]), S += A[i];
  while (!last) {
    last = true;
    if (T >= S) res += T / S * cur, T %= S;
    for (long long i = 0; i < n; ++i)
      if (T < A[i])
        S -= A[i], --cur, A[i] = -1;
      else if (T >= A[i] && A[i] != -1)
        T -= A[i], ++res, last = false;
  }
  cout << res;
}
