#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  long long i, t, n;
  cin >> n >> t;
  long long a[n], sum = 0, candy = 0, mn = INT_MAX, temp, k;
  vector<long long> v1;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    mn = min(mn, a[i]);
    v1.push_back(a[i]);
  }
  while (mn <= t) {
    n = v1.size();
    sum = 0, k = 0;
    for (i = 0; i < n; i++) {
      if (v1[i] <= t) {
        sum += v1[i];
        k++;
      }
    }
    if (sum <= t) {
      temp = t / sum;
      candy = candy + temp * k;
      t = t % sum;
    } else {
      for (i = 0; i < n; i++) {
        if (v1[i] <= t) {
          t -= v1[i];
          candy++;
        }
      }
    }
    vector<long long> v2;
    for (i = 0; i < n; i++) {
      if (v1[i] <= t) {
        v2.push_back(v1[i]);
      }
    }
    v1.clear();
    long long m = v2.size();
    for (i = 0; i < m; i++) {
      v1.push_back(v2[i]);
    }
  }
  cout << candy;
  return 0;
}
