#include <bits/stdc++.h>
using namespace std;
string s;
int x, y, n;
void upd(pair<int, int> &pos, char mov, int d) {
  if (mov == 'U')
    pos.second += d;
  else if (mov == 'D')
    pos.second -= d;
  else if (mov == 'R')
    pos.first += d;
  else
    pos.first -= d;
}
bool can(pair<int, int> pos, pair<int, int> dist, int len) {
  int d = abs(dist.second - pos.second) + abs(dist.first - pos.first);
  if (d % 2 != len % 2) return false;
  return len >= d;
}
bool ok(int len) {
  pair<int, int> pos = {0, 0};
  for (int i = len; i < n; i++) upd(pos, s[i], 1);
  int l = 0, r = len;
  while (true) {
    if (can(pos, {x, y}, len)) return true;
    if (r == n) break;
    upd(pos, s[l++], 1);
    upd(pos, s[r++], -1);
  }
  return false;
}
int main() {
  long long n, t;
  cin >> n >> t;
  long long a[n];
  bool vis[n];
  memset(vis, false, sizeof(vis));
  long long total = 0, ct = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] <= t) {
      total += a[i];
      ct++;
      vis[i] = true;
    }
  }
  long long ans = 0;
  while (total > 0) {
    ans += (t / total) * ct;
    t %= total;
    for (int i = 0; i < n; i++)
      if (a[i] > t && vis[i]) {
        total -= a[i];
        vis[i] = false;
        ct--;
      }
    if (ct > 0 && total > t) {
      for (int i = 0; i < n; i++) {
        if (a[i] <= t) {
          ans++;
          t -= a[i];
        }
      }
    }
  }
  cout << ans;
  return 0;
}
