#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long md = 998244353;
const int MAXLEN = 200000;
mt19937 rnd(100500);
long long n, mas[200000], t, sum, ans;
int main() {
  ios_base::sync_with_stdio(false);
  ;
  cin.tie(NULL);
  ;
  cin >> n >> t;
  sum = ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> mas[i];
  }
  bool flag = true;
  while (flag) {
    flag = false;
    sum = 0;
    long long cnt = 0;
    for (int i = 0; i < n; i++) {
      if (t >= mas[i]) {
        t -= mas[i];
        ans++;
        cnt++;
        sum += mas[i];
        flag = true;
      }
    }
    if (sum != 0) {
      ans += (t / sum) * cnt;
      t %= sum;
    }
  }
  cout << ans;
  return 0;
}
