#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, cnt = 0, summ = 0, ans = 0;
  long long arr[200005];
  bool visited[200005];
  bool flag = 0;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    summ += arr[i];
    visited[i] = 0;
  }
  cnt = n;
  while (m > 0) {
    if (m > summ) {
      ans += m / summ * cnt;
      m %= summ;
    } else {
      flag = 0;
      for (int i = 0; i < n; i++) {
        if (arr[i] > m && !visited[i]) {
          visited[i] = 1;
          summ -= arr[i];
          cnt--;
          flag = 1;
        } else if (arr[i] <= m && !visited[i]) {
          m -= arr[i];
          ans++;
          flag = 1;
        }
      }
      if (cnt == 0) break;
      if (!flag) break;
    }
  }
  cout << ans << endl;
  return 0;
}
