#include <bits/stdc++.h>
using namespace std;
int const maxn = 222222;
int a[maxn], n;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
pair<long long, long long> get(long long T) {
  long long sum = 0, count = 0;
  for (int i = 0; i < n; i++) {
    if (T >= a[i]) {
      T -= a[i];
      sum += a[i];
      count++;
    }
  }
  return {sum, count};
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long T;
  cin >> n >> T;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long res = 0;
  int mn = *min_element(a, a + n);
  while (T >= mn) {
    pair<long long, long long> cur = get(T);
    res += (T / cur.first) * cur.second;
    T %= cur.first;
  }
  cout << res;
  return 0;
}
