#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
const int mod = 998244353;
const int B = sqrt(2e5);
long long n, T;
long long ans;
long long a[N];
long long d[N];
int main() {
  ios_base::sync_with_stdio(0);
  long long mn = 2e18;
  cin >> n >> T;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    d[i] = d[i - 1] + a[i];
    mn = min(mn, a[i]);
  }
  while (T >= mn) {
    long long g = 0;
    long long sum = 0;
    for (int i = 1; i <= n; i++) {
      if (sum + a[i] <= T) {
        sum += a[i];
        g++;
      }
    }
    ans += (T / sum) * g;
    T -= T / sum * sum;
  }
  cout << ans;
}
