#include <bits/stdc++.h>
using namespace std;
inline char get(void) {
  static char buf[100000], *S = buf, *T = buf;
  if (S == T) {
    T = (S = buf) + fread(buf, 1, 100000, stdin);
    if (T == S) return EOF;
  }
  return *S++;
}
inline void read(int& x) {
  static char c;
  x = 0;
  for (c = get(); c < '0' || c > '9'; c = get())
    ;
  for (; c >= '0' && c <= '9'; c = get()) x = x * 10 + c - '0';
}
const int M = 1000 * 1000 + 10;
int n;
long long t;
long long sum = 0;
long long ans = 0;
int a[M];
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> t;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    sum += a[i];
  }
  int no = 0;
  while (1) {
    bool flag = true;
    ans += (t / sum) * (n - no);
    t %= sum;
    for (int i = 0; i < n; ++i) {
      if (a[i] == -1) continue;
      if (t < a[i]) {
        sum -= a[i];
        a[i] = -1;
        ++no;
      } else {
        flag = false;
        ++ans;
        t -= a[i];
      }
    }
    if (flag) break;
  }
  cout << ans << endl;
  return 0;
}
