#include <bits/stdc++.h>
using namespace std;
vector<unsigned long long int> v, mn;
int main() {
  unsigned long long int n, k, tk, sum = 0, x;
  scanf("%lld %lld", &n, &k);
  tk = k;
  unsigned long long int a[n];
  unsigned long long int res = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    mn.push_back(a[i]);
  }
  while (tk > 0) {
    v.clear();
    sum = 0;
    for (int i = 0; i < mn.size(); i++) {
      x = mn[i];
      if (tk >= x) {
        v.push_back(x);
        sum += x;
        tk -= x;
      }
    }
    res += v.size();
    if (tk <= 0 || v.size() == 0) {
      cout << res << endl;
      return 0;
    }
    unsigned long long int tmp = tk / sum;
    res += tmp * v.size();
    tk -= tmp * sum;
    mn.clear();
    for (int i = 0; i < v.size(); i++) {
      if (tk >= v[i]) {
        tk -= v[i];
        res++;
        mn.push_back(v[i]);
      }
    }
    if (mn.size() == 0) break;
  }
  cout << res << endl;
}
