#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t = 1;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  while (t--) {
    long long int i, j, k, m, n, ans = 0;
    cin >> n >> m;
    long long int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    while (1) {
      long long int mm = 0, c = 0;
      for (i = 0; i < n; i++) {
        if (a[i] <= m) {
          m -= a[i];
          c++;
          mm += a[i];
        }
      }
      ans += c;
      if (mm) ans = ans + (m / mm) * c;
      if (mm) m -= (m / mm) * mm;
      if (c == 0) break;
    }
    cout << ans;
  }
  return 0;
}
