#include <bits/stdc++.h>
using namespace std;
void update(vector<long long> &bit, unsigned int ind, long long val) {
  while (ind < bit.size()) {
    bit[ind] += val;
    ind += (ind & -ind);
  }
}
long long query_sum(vector<long long> &bit, unsigned int ind) {
  long long sum = 0;
  while (ind > 0) {
    sum += bit[ind];
    ind -= (ind & -ind);
  }
  return sum;
}
int search_greater(vector<long long> &bit, long long bound) {
  long long sum = 0, last_greater = bit.size() - 1;
  unsigned int ind = 1;
  while ((ind ^ (bit.size() - 1)) > ind) {
    ind <<= 1;
  }
  while ((ind & 1) != 1) {
    if (ind >= bit.size()) {
      ind -= ((ind & -ind) >> 1);
      continue;
    }
    sum += bit[ind];
    if (sum > bound) {
      last_greater = ind;
      sum -= bit[ind];
      ind -= ((ind & -ind) >> 1);
    } else if (sum <= bound) {
      ind += ((ind & -ind) >> 1);
    }
  }
  return (sum + bit[ind] > bound) ? ind : last_greater;
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  long long t;
  cin >> n >> t;
  vector<long long> prices(n + 1);
  vector<long long> bit(n + 1);
  for (int i = 1; i <= n; ++i) {
    cin >> prices[i];
    update(bit, i, prices[i]);
  }
  long long cnt = 0, sum = query_sum(bit, n);
  int booths = n;
  while (sum > 0 && t > 0) {
    if (t >= sum) {
      cnt += t / sum * booths;
      t %= sum;
    }
    int ind = search_greater(bit, t);
    update(bit, ind, -prices[ind]);
    sum = query_sum(bit, n);
    --booths;
  }
  cout << cnt << "\n";
  return 0;
}
