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