#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
long long powmod(long long a, long long b, long long MOD) {
  long long ans = 1;
  while (b) {
    if (b % 2) ans = ans * a % MOD;
    a = a * a % MOD;
    b /= 2;
  }
  return ans;
}
long long n, T, a[200005];
int main() {
  cin >> n >> T;
  long long mi = INT_MAX;
  long long ans = 0, sum = 0;
  long long tot = 0;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), mi = min(mi, a[i]);
  while (T >= mi) {
    tot = 0;
    sum = 0;
    for (int i = 1; i <= n; i++)
      if (a[i] <= T) {
        T -= a[i];
        sum += a[i];
        tot++;
        ans++;
      }
    ans += tot * (T / sum);
    T %= sum;
  }
  cout << ans;
}
