#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ans = 0, t, sum = 0;
  int mn = 1e9, num;
  cin >> n >> t;
  vector<long long> C(n);
  for (int i = 0; i < n; i++) {
    cin >> C[i];
    mn = min(mn, (int)C[i]);
  }
  while (t >= mn) {
    sum = num = 0;
    for (int i = 0; i < n; i++) {
      if (C[i] <= (t - sum)) {
        sum += C[i];
        num++;
      }
    }
    ans += (t / sum) * num;
    t = t % sum;
  }
  cout << ans << endl;
}
