#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(2);
  cout << fixed;
  set<long long> s, s1;
  long long n, t;
  cin >> n >> t;
  long long sum = 0;
  long long x = n;
  long long ar[n];
  long long ans = 0;
  for (long long i = 0, _n = (n); i < _n; i++) {
    s.insert(i);
    cin >> ar[i];
    sum += ar[i];
  }
  while (x != 0) {
    long long z = (t / sum) * x;
    long long k = t / sum;
    ans += z;
    t -= k * sum;
    for (auto i : s) {
      if (ar[i] <= t) {
        t -= ar[i];
        s1.insert(i);
        ans++;
      } else {
        sum -= ar[i];
        x--;
      }
    }
    s.clear();
    s = s1;
    s1.clear();
  }
  cout << ans;
  return 0;
}
