#include <bits/stdc++.h>
using namespace std;
long long a[200000];
int main() {
  long long n, t;
  scanf("%I64d %I64d", &n, &t);
  for (int i = 0; i < n; i++) scanf("%I64d", &a[i]);
  long long totalItems = 0;
  while (t > 0) {
    long long gasta = 0;
    long long items = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] + gasta <= t) {
        gasta += a[i];
        items++;
      }
    }
    if (gasta == 0) break;
    long long cant = t / gasta;
    totalItems += (cant * items);
    t -= (cant * gasta);
  }
  printf("%I64d\n", totalItems);
  return 0;
}
