#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, t;
  long long cnt = 0;
  cin >> n >> t;
  vector<long long> ar(n);
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  long long c = 0;
  while (1) {
    long long sum = 0;
    long long k = 0;
    for (int i = 0; i < n; i++) {
      if (ar[i] <= t) {
        t -= ar[i];
        k++;
        c++;
        sum += ar[i];
      }
    }
    if (k == 0) break;
    c += (t / sum) * k;
    t %= sum;
  }
  cout << c;
  return 0;
}
