#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k, ans = 0, mn = INT_MAX;
  cin >> n >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i], mn = min(a[i], mn);
  while (k >= mn) {
    long long kc = k, cnt = 0, p = 0;
    for (long long i = 0; i < n; i++) {
      if (k >= a[i]) k -= a[i], p += a[i], cnt += 1;
    }
    ans += (kc / p) * cnt;
    k = kc % p;
  }
  cout << ans;
}
