#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  cin >> n >> m;
  long long a[n], sum = 0;
  set<long long> s;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    s.insert(i);
  }
  long long ans = 0;
  while ((long long)s.size() > 0) {
    ans += (m / sum) * (long long)s.size();
    m %= sum;
    vector<long long> v;
    for (long long x : s) v.push_back(x);
    for (long long x : v) {
      if (a[x] <= m) {
        ans++;
        m -= a[x];
      } else {
        s.erase(x);
        sum -= a[x];
      }
    }
  }
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
