#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000 + 47;
const long long LINF = (long long)INF * INF;
const int MAX = 2e5;
const double EPS = 1e-9;
const double PI = acos(-1.);
int n;
long long T;
vector<long long> pref;
long long a[200005];
long long b[200005];
int used[200005];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> T;
  for (int i = (0); i < (n); ++i) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b, b + n);
  pref.resize(n);
  for (int i = (0); i < (n); ++i) {
    if (i)
      pref[i] = pref[i - 1] + b[i];
    else
      pref[i] = b[i];
  }
  long long ans = 0;
  while (pref.size()) {
    if (T >= pref.back()) {
      ans += 1LL * (T / (long long)pref.back()) * (long long)pref.size();
      T %= (long long)pref.back();
    }
    for (int i = (0); i < (n); ++i) {
      if (T >= a[i]) {
        T -= a[i];
        ans++;
      } else {
        if (used[i]) continue;
        used[i] = 1;
        if (pref.size() == 0) break;
        pref.pop_back();
      }
    }
  }
  cout << ans << endl;
}
