#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int main() {
  int n, m, i, j, minn = 2e9 + 7;
  long long T, ans = 0, sum = 0;
  scanf("%d %lld", &n, &T);
  for (i = 0; i < n; i++) {
    scanf("%d", &j);
    a.push_back(j);
    minn = min(j, minn);
  }
  while (T >= minn) {
    sum = 0;
    int t = 0;
    for (i = 0; i < n; i++) {
      if (T >= a[i]) {
        T -= a[i];
        sum += a[i];
        t += 1;
      }
    }
    ans += t + (long long)(T / sum) * t;
    T %= sum;
  }
  printf("%lld", ans);
  return 0;
}
