#include <bits/stdc++.h>
using namespace std;
namespace whatever {
int readu() {
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  int value = ch - '0';
  ch = getchar();
  while (isdigit(ch)) {
    value = value * 10 + ch - '0';
    ch = getchar();
  }
  return value;
}
long long readull() {
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  long long value = ch - '0';
  ch = getchar();
  while (isdigit(ch)) {
    value = value * 10 + ch - '0';
    ch = getchar();
  }
  return value;
}
void writeull(long long n) {
  if (n < 10)
    putchar(n + '0');
  else {
    writeull(n / 10);
    putchar(n % 10 + '0');
  }
}
void run() {
  int n = readu();
  long long t = readull();
  static int a[200000];
  for (int i = 0; i < n; ++i) a[i] = readu();
  long long result = 0;
  while (n != 0) {
    long long sum = accumulate(a, a + n, 0ll);
    result += t / sum * n;
    t %= sum;
    for (int i = 0; i < n; ++i)
      if (t >= a[i]) {
        t -= a[i];
        ++result;
      }
    n = remove_if(a, a + n, [t](int a) { return a > t; }) - a;
  }
  writeull(result);
  putchar('\n');
}
}  // namespace whatever
int main() { whatever::run(); }
