#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
long long C[1 << 20], a[N];
int rec[1 << 20];
int n;
int lowbit(int x) { return x & -x; }
long long sum1(int x) {
  long long ret = 0;
  while (x > 0) {
    ret += C[x];
    x -= lowbit(x);
  }
  return ret;
}
int sum2(int x) {
  int ret = 0;
  while (x > 0) {
    ret += rec[x];
    x -= lowbit(x);
  }
  return ret;
}
void add1(int x, long long d) {
  while (x <= n) {
    C[x] += d;
    x += lowbit(x);
  }
}
void add2(int x, int d) {
  while (x <= n) {
    rec[x] += d;
    x += lowbit(x);
  }
}
int main() {
  int l, r, mid;
  long long t, now, ans;
  scanf("%d", &n);
  scanf("%I64d", &t);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  memset(C, 0, sizeof(C));
  memset(rec, 0, sizeof(rec));
  for (int i = 1; i <= n; i++) {
    add1(i, a[i]);
    add2(i, 1);
  }
  ans = 0;
  while (sum2(n) > 0) {
    now = sum1(n);
    ans += t / now * sum2(n);
    t %= now;
    l = 0;
    while (l <= n && sum1(n) > t) {
      r = n + 1;
      while (r - l > 1) {
        mid = (l + r) >> 1;
        if (sum1(mid) <= t)
          l = mid;
        else
          r = mid;
      }
      if (r <= n) {
        add1(r, -a[r]);
        add2(r, -1);
        l = r;
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
