#include <bits/stdc++.h>
using namespace std;
long long n, t, A[200050], nxt[200050];
int main() {
  cin >> n >> t;
  long long loop = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> A[i];
    loop += A[i];
    nxt[i] = i + 1;
    if (i == n) nxt[i] = 1;
  }
  long long alive = n;
  long long ans = 0;
  long long c = 1;
  long long prv = n;
  while (nxt[c] != c) {
    if (loop == 0) break;
    ans += (t / loop) * alive;
    t %= loop;
    if (A[c] <= t) {
      t -= A[c];
      ans++;
    } else {
      loop -= A[c];
      alive--;
      nxt[prv] = nxt[c];
    }
    prv = c;
    c = nxt[c];
  }
  ans += t / A[c];
  cout << ans;
}
