#include <bits/stdc++.h>
using namespace std;
const int maxN = 200000 + 10;
struct Node {
  int v, nxt;
} d[maxN];
int n;
long long T;
void work();
int main() {
  work();
  return 0;
}
void work() {
  scanf("%d%I64d", &n, &T);
  long long ans = 0, sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &d[i].v);
    d[i].nxt = i + 1;
    sum += d[i].v;
  }
  d[0].nxt = 1;
  d[n].nxt = 0;
  int k = n;
  while (1) {
    ans += k * (T / sum);
    T %= sum;
    sum = 0;
    k = 0;
    int i = 0;
    while (d[i].nxt) {
      int j = d[i].nxt;
      if (sum + d[j].v <= T) {
        k++;
        sum += d[j].v;
        i = j;
      } else
        d[i].nxt = d[j].nxt;
    }
    if (!k) break;
  }
  printf("%I64d", ans);
}
