#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n;
  long long T;
  cin >> n >> T;
  long long sum = 0;
  set<pair<int, long long>> s;
  for (int i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    s.emplace(i, x);
    sum += x;
  }
  long long ans = 0;
  for (auto it = s.begin(); s.size();) {
    if (it == s.end()) it = s.begin();
    ans += (T / sum) * (long long)s.size();
    T %= sum;
    if (it->second > T) {
      sum -= it->second;
      it = s.erase(it);
    } else {
      T -= it->second;
      ++ans;
      ++it;
    }
  }
  assert(sum == 0);
  cout << ans;
  return 0;
}
