#include <bits/stdc++.h>
const long long INF = 2000000005;
const long long BIG_INF = 2000000000000000005;
const long long mod = 1000000007;
const long long P = 31;
const long double PI = 3.141592653589793238462643;
using namespace std;
vector<pair<long long, long long> > dir = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
bool valid(long long x, long long y, long long n, long long m) {
  return x >= 0 && y >= 0 && x < n && y < m;
}
mt19937 rng(1999999973);
long long n, T, ans = 0;
vector<long long> a, t;
void build(long long v, long long tl, long long tr) {
  if (tl == tr) {
    t[v] = a[tl];
    return;
  }
  long long tm = (tl + tr) / 2;
  build(v * 2, tl, tm);
  build(v * 2 + 1, tm + 1, tr);
  t[v] = t[v * 2] + t[v * 2 + 1];
}
void update(long long v, long long tl, long long tr, long long pos) {
  if (pos < tl || pos > tr) return;
  t[v] -= a[pos];
  if (tl == tr) return;
  long long tm = (tl + tr) / 2;
  update(v * 2, tl, tm, pos);
  update(v * 2 + 1, tm + 1, tr, pos);
}
long long sum(long long v, long long tl, long long tr, long long l,
              long long r) {
  if (tl > r || tr < l) return 0;
  if (tl >= l && tr <= r) return t[v];
  long long tm = (tl + tr) / 2;
  return sum(v * 2, tl, tm, l, r) + sum(v * 2 + 1, tm + 1, tr, l, r);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> T;
  a.resize(n);
  t.resize(4 * n, 0);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  build(1, 0, n - 1);
  long long col = n;
  while (col > 0) {
    ans += col * (T / t[1]);
    T %= t[1];
    while (T < t[1]) {
      long long l = 0, r = n - 1;
      while (l != r) {
        long long m = (r + l) / 2;
        if (r - l == 1) m = l;
        if (sum(1, 0, n - 1, 0, m) > T)
          r = m;
        else
          l = m + 1;
      }
      update(1, 0, n - 1, l);
      col--;
    }
  }
  cout << ans;
  return 0;
}
