#include <bits/stdc++.h>
using namespace std;
long long int n, a, b, c = 19999999999, m, ans = 0, total = 0;
;
long long int arr[200010];
long long int sum[200010] = {0};
int main(void) {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    c = min(c, arr[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (arr[i] <= m) {
      ans++;
      m -= arr[i];
      total += arr[i];
    }
  }
  cerr << ans << endl;
  if (m < c) {
    cout << ans << endl;
    return 0;
  }
  a = ans;
  if (total <= m) {
    ans += (m / total) * a;
    m -= (m / total) * total;
  }
  c = 1999999999;
  for (int i = 1; i <= n; i++) {
    c = min(c, arr[i]);
  }
  total = 0;
  a = 0;
  for (int i = 1; i <= n; i++) {
    if (arr[i] <= m) {
      ans++;
      a++;
      m -= arr[i];
      total += arr[i];
    }
  }
  if (total <= m && a != 0) {
    ans += (m / total) * a;
    m -= (m / total) * total;
  }
  a = 0;
  while (m >= c) {
    total = 0;
    b = 0;
    for (int i = 1; i <= n; i++) {
      if (arr[i] <= m) {
        ans++;
        b++;
        m -= arr[i];
        total += arr[i];
      }
    }
    a++;
    if (total <= m && total != 0) {
      ans += (m / total) * b;
      m -= (m / total) * total;
    }
  }
  cout << ans << endl;
  return 0;
}
