#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &_) {
  T __ = 0, ___ = 1;
  char ____ = getchar();
  while (!isdigit(____)) {
    if (____ == '-') ___ = 0;
    ____ = getchar();
  }
  while (isdigit(____)) {
    __ = (__ << 1) + (__ << 3) + ____ - '0';
    ____ = getchar();
  }
  _ = ___ ? __ : -__;
}
int n;
long long num[500008];
long long ans, T, sum, val, cdy[500008];
int main() {
  read(n);
  read(T);
  for (register int i = 1; i <= n; ++i) read(num[i]);
  for (register int i = n; i; --i) {
    if (i == n)
      cdy[i] = num[i];
    else
      cdy[i] = min(num[i], cdy[i + 1]);
  }
  for (register int i = 1, all = 0; i <= n; ++i) {
    all = 0;
    sum = 0;
    for (register int j = 1; j <= n; ++j) {
      if (T - sum >= cdy[j]) {
        if (sum + num[j] <= T) sum += num[j], ++all;
      } else
        break;
    }
    if (sum == 0) break;
    ans += (T / sum) * all;
    T %= sum;
  }
  cout << ans << endl;
  return 0;
}
