#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long r = 1, z = x;
  while (y) {
    if (y & 1) r *= z;
    z *= z;
    y = y >> 1;
  }
  return r;
}
long long powerm(long long x, long long y, long long p) {
  long long r = 1;
  while (y) {
    if (y & 1) r = (r * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return r % p;
}
long long modinv(long long x, long long m) { return powerm(x, m - 2, m); }
long long logarithm(long long a, long long b) {
  long long x = 0;
  while (a > 1) {
    x++;
    a /= b;
  }
  return x;
}
long long max3(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
long long min3(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
void under_rated() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int32_t main() {
  under_rated();
  long long n, money;
  cin >> n >> money;
  vector<long long> v;
  long long tot = 0;
  long long mi = 1e18;
  for (long long i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    v.push_back(x);
    tot += x;
    mi = min(mi, x);
  }
  long long ans = n * (money / tot);
  money %= tot;
  while (money >= mi) {
    vector<long long> lol;
    long long tot1 = 0;
    for (long long i = 0; i < n; ++i) {
      if (money >= v[i]) {
        lol.push_back(v[i]);
        tot1 += v[i];
      }
    }
    ans += lol.size() * (money / tot1);
    money %= tot1;
    for (long long i = 0; i < lol.size(); ++i) {
      if (lol[i] > money) {
        continue;
      }
      money -= lol[i];
      ++ans;
      if (money < mi) {
        break;
      }
    }
  }
  cout << ans;
  return 0;
}
