#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int TESTS = 1;
  while (TESTS--) {
    long long n, T, y = 0, h = 0, hello = 1234567989123, i;
    cin >> n >> T;
    long long k = T;
    y = T;
    long long c = 0;
    long long a = 0;
    long long ans = 0;
    vector<long long int> v;
    for (i = 0; i < n; i++) {
      long long x;
      cin >> x;
      v.push_back(x);
      hello = min(hello, x);
    }
    while (k > 0 && k >= hello) {
      for (i = 0; i < n; i++) {
        if (y < hello) break;
        if (v[i] <= y) {
          c++;
          y -= v[i];
          a += v[i];
        }
      }
      h = k / a;
      k = k - h * a;
      h = h * c;
      ans += h;
      if (y < hello) break;
      y = k;
      c = 0;
      a = 0;
    }
    cout << ans << '\n';
  }
  return 0;
}
