#include <bits/stdc++.h>
using namespace std;
long long a[200005];
queue<long long> q;
void solve() {
  int n;
  long long t;
  scanf("%d%lld", &n, &t);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    q.push(a[i]);
  }
  long long ans = 0;
  while (!q.empty()) {
    long long sum = 0;
    int num = q.size(), o = 0, l = 0;
    while (o < num) {
      o++;
      long long p = q.front();
      q.pop();
      if (t >= p) {
        t -= p;
        l++;
        sum += p;
        ans++;
        q.push(p);
      }
    }
    if (sum == 0) break;
    long long tmp = t / sum;
    ans += l * tmp;
    t -= tmp * sum;
  }
  printf("%lld\n", ans);
}
int main() {
  solve();
  return 0;
}
