#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, t, candi = 0;
  cin >> n >> t;
  long long a[n];
  for (int lc = 0; lc <= n - 1; lc++) {
    cin >> a[lc];
  }
  while (1) {
    long long booth = 0, sum = 0;
    for (int lc = 0; lc <= n - 1; lc++) {
      if (a[lc] + sum <= t) {
        sum += a[lc];
        booth++;
      }
    }
    if (!booth) break;
    long long round = t / sum;
    candi += round * booth;
    t -= sum * round;
  }
  cout << candi;
}
