#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, t;
  cin >> n >> t;
  long long int ans = 0;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  while (true) {
    long long int sum = 0, count = 0;
    for (long long int i = 0; i < n; i++) {
      if (t >= arr[i] + sum) {
        sum += arr[i];
        count++;
      }
    }
    if (sum == 0) break;
    ans += t / sum * count;
    t = t % sum;
  }
  cout << ans << endl;
}
