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