#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, t, res = 0, _t, s, k;
  cin >> n >> t;
  vector<long long> a(n + 1);
  for (int i = 1; i <= n; i++) cin >> a[i];
  while (t > 0) {
    _t = t;
    s = 0;
    k = 0;
    for (int i = 1; i <= n; i++)
      if (s + a[i] <= t) {
        s += a[i];
        k++;
      }
    if (s == 0) break;
    res += k * (t / s);
    t %= s;
    if (t == _t) break;
  }
  cout << res;
}
