#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, t;
  cin >> n >> t;
  long long int a[n];
  long long int maxx = 0;
  long long int minn = 1000000000000;
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > maxx) maxx = a[i];
    if (a[i] < minn) minn = a[i];
    sum += a[i];
  }
  long long int temp = t - maxx;
  long long int q = temp / sum;
  long long int rem = (temp % sum) + maxx;
  long long int tc = q * n;
  while (rem > sum) {
    temp = rem;
    q = temp / sum;
    rem = (temp % sum);
    tc += q * n;
  }
  long long int tot = 0;
  long long int i = 0;
  while (rem >= minn) {
    sum = 0;
    int coun = 0;
    for (int i = 0; i < n; i++) {
      if (rem >= a[i]) {
        rem -= a[i];
        tc++;
        coun++;
        sum += a[i];
      }
    }
    while (rem > sum) {
      q = rem / sum;
      temp = rem;
      rem = temp % sum;
      tc += (q * coun);
    }
  }
  cout << tc << endl;
  return 0;
}
