#include <bits/stdc++.h>
using namespace std;
void file() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const long long N = 2e5 + 7;
const long long MOD = 1e9 + 7;
unsigned long long n, m, a[N], k = 0, ans;
vector<unsigned long long> pr[N];
int main() {
  file();
  cin >> n >> m;
  unsigned long long x = 0;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    if (x + a[i] <= m) {
      x += a[i];
      pr[k].push_back(a[i]);
    }
  }
  if (!x) return cout << 0, 0;
  ans += m / x * pr[k].size();
  m -= m / x * x;
  while (1) {
    if (!m) break;
    x = 0;
    ++k;
    for (long long i = 0; i < pr[k - 1].size(); ++i) {
      if (x + pr[k - 1][i] <= m) {
        pr[k].push_back(pr[k - 1][i]);
        x += pr[k - 1][i];
      }
    }
    if (!x) break;
    ans += m / x * pr[k].size();
    m -= m / x * x;
  }
  cout << ans;
}
