#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long long, long long> &a, pair<long long, long long> &b) {
  if (a.first == b.first) return (a.second < b.second);
  return a.first < b.first;
}
long long nCr(long long n, long long r) {
  long long res = 1;
  for (int i = n; i > max(r, n - r); i--) res *= i, res %= 1000000007;
  for (int i = 2; i <= min(r, n - r); i++) res /= i;
  return res % 1000000007;
}
long long exp(long long n, long long j) {
  long long i = n, res = 1;
  while (j > 0) {
    if (j & 1) res *= i;
    res %= 998244353;
    i = i * i;
    i %= 998244353;
    j >>= 1;
  }
  return res % 998244353;
}
int main() {
  int T = 1;
  while (T--) {
    long long n, t, i, j, k = 0, sm = 0, ans = 0;
    cin >> n >> t;
    vector<long long> v;
    for (i = 0; i < n; i++) {
      cin >> j;
      v.push_back(j);
    }
    while (1) {
      vector<long long> w;
      for (auto it : v) {
        if (sm + it <= t) sm += it, w.push_back(it);
      }
      if (w.empty()) break;
      ans += (t / sm) * (w.size());
      t %= sm;
      sm = 0;
      v.clear();
      for (auto it : w) v.push_back(it);
    }
    cout << ans;
  }
}
