#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long cnt, n, k, i, j, t, temp = 0, sum;
  t = 1;
  while (t--) {
    cin >> n >> k;
    sum = 0;
    long long ans = 0, a[n], b[n], c[300000] = {0}, qty = 0;
    queue<long long> q;
    for (i = 0; i < n; i++) {
      cin >> temp;
      sum += temp;
      if (sum <= k) {
        q.push(temp);
        qty++;
      } else
        sum -= temp;
    }
    j = 0;
    temp = 0;
    while (1) {
      if (sum == 0) break;
      ans += (k / sum) * qty;
      k -= (k / sum) * sum;
      j = qty;
      sum = 0;
      qty = 0;
      for (i = 0; i < j; i++) {
        temp = q.front();
        q.pop();
        sum += temp;
        if (sum <= k) {
          q.push(temp);
          qty++;
        } else
          sum -= temp;
      }
      if (qty == 0) break;
    }
    cout << ans;
  }
  return 0;
}
