#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 100005;
int n, nb;
unsigned long long T, sum;
int a[N];
priority_queue<pair<int, int> > q;
bool clean() {
  while (q.size() && q.top().first > T) {
    unsigned long long value = (unsigned long long)q.top().first;
    a[q.top().second] = 0;
    sum -= value;
    q.pop();
    nb--;
  }
  return (q.size() > 0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> T;
  nb = n;
  int mini = 2000000005;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    mini = min(mini, a[i]);
    sum += a[i];
  }
  unsigned long long res{0};
  while (T >= mini) {
    if (sum <= T) {
      unsigned long long tours = (unsigned long long)(T / sum);
      res += tours * nb;
      T -= tours * sum;
    }
    for (int i = 0; i < n; ++i) {
      if (a[i] && (a[i] <= T)) {
        T -= a[i];
        res++;
      } else if (a[i] > T) {
        sum -= a[i];
        a[i] = 0;
        nb--;
      }
    }
  }
  cout << res;
}
