#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
long double PI = 2 * acos(0.0);
template <typename T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
template <typename T>
T mod_exp(T b, T p, T m) {
  T x = 1;
  while (p) {
    if (p & 1) x = (x * b) % m;
    b = (b * b) % m;
    p = p >> 1;
  }
  return x;
}
template <typename T>
T invFermat(T a, T p) {
  return mod_exp(a, p - 2, p);
}
template <typename T>
T exp(T b, T p) {
  T x = 1;
  while (p) {
    if (p & 1) x = (x * b);
    b = (b * b);
    p = p >> 1;
  }
  return x;
}
string tostring(long long int number) {
  stringstream ss;
  ss << number;
  return ss.str();
}
vector<long long int> tision(long long int m) {
  vector<long long int> actor;
  while (m % 2 == 0) {
    actor.push_back(2);
    m /= 2;
  }
  for (long long int d = 3; d * d <= m; d += 2) {
    while (m % d == 0) {
      actor.push_back(d);
      m /= d;
    }
  }
  if (m > 1) actor.push_back(m);
  return actor;
}
long long int binpower(long long int base, long long int e, long long int mod) {
  long long int result = 1;
  base %= MOD;
  while (e) {
    if (e & 1) result = (long long int)result * base % MOD;
    base = (long long int)base * base % MOD;
    e >>= 1;
  }
  return result;
}
bool check_composite(long long int n, long long int a, long long int d,
                     long long int s) {
  long long int x = binpower(a, d, n);
  if (x == 1 || x == n - 1) return false;
  for (long long int r = 1; r < s; r++) {
    x = (long long int)x * x % n;
    if (x == n - 1) return false;
  }
  return true;
};
bool mil(long long int m) {
  if (m < 2) return false;
  long long int r = 0;
  long long int d = m - 1;
  while ((d & 1) == 0) {
    d >>= 1;
    r++;
  }
  for (long long int a : {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37}) {
    if (m == a) return true;
    if (check_composite(m, a, d, r)) return false;
  }
  return true;
}
bool vis[105];
vector<long long int> zero(105);
vector<vector<long long int>> adj(105);
void dfs(long long int s) {
  for (long long int i = 0; i < adj[s].size(); i++) {
    if (!vis[i]) {
      vis[i] = 1;
      dfs(i);
    }
  }
}
const long long int maxm = 1;
vector<bool> is_prime(maxm, true);
vector<long long int> dp(maxm);
void sieve() {
  is_prime[0] = is_prime[1] = false;
  for (long long int i = 2; i * i <= maxm; i++) {
    if (is_prime[i]) {
      for (long long int j = i * i; j <= maxm; j += i) is_prime[j] = false;
    }
  }
  for (long long int i = 2; i < maxm; i++) {
    dp[i] = dp[i - 1] + (is_prime[i] && is_prime[i - 2]);
  }
}
pair<long long int, long long int> minma(long long int a[], long long int i,
                                         long long int j, long long int &maxi,
                                         long long int &mini) {
  pair<long long int, long long int> p;
  pair<long long int, long long int> q;
  if (j == i) {
    maxi = max(maxi, a[j]);
    mini = min(mini, a[j]);
    p.first = maxi;
    p.second = mini;
    return p;
  }
  if (j == i + 1) {
    maxi = max(maxi, a[j]);
    mini = min(mini, a[j]);
    maxi = max(maxi, a[i]);
    mini = min(mini, a[i]);
    p.first = maxi;
    p.second = mini;
    return p;
  } else {
    long long int x = (i + j) / 2;
    p = minma(a, i, x, maxi, mini);
    q = minma(a, x + 1, j, maxi, mini);
    p.first = max(p.first, q.first);
    p.second = min(p.second, q.second);
    return p;
  }
}
void solve() {
  long long int n, t;
  cin >> n >> t;
  long long int ti = t;
  long long int sum = 0, A[n], d = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> A[i];
  }
  for (long long int i = 0; i < n; i++) {
    sum += A[i];
  }
  long long int rem = 0, ans = 0;
  rem = t % sum;
  ans = t / sum;
  ans *= n;
  long long int f = 1, z = n, s = 0;
  while (f) {
    z = 0;
    s = 0;
    long long int c = 0, te = rem;
    for (long long int i = 0; i < n; i++) {
      if (te < A[i]) {
        c++;
        if (c > n - 1) {
          cout << ans << "\n";
          return;
        }
      } else {
        te -= A[i];
        s += A[i];
        z++;
      }
    }
    long long int tem = rem / s;
    tem = tem * z;
    rem = (rem % s);
    ans += tem;
    if (c == n) {
      f = 0;
    }
  }
  cout << ans;
}
void sort012(long long int a[], long long int n) {
  long long int l = 0, mid = 0, end = n - 1;
  for (long long int i = 0; i < n; i++) {
    if (a[i] == 0) {
      l++;
      mid++;
    } else if (a[i] == 1) {
      mid++;
    }
  }
  for (long long int i = 0; i < n; i++) {
    if (i < l) {
      a[i] = 0;
    } else if (i < mid) {
      a[i] = 1;
    } else {
      a[i] = 2;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int nikunj = 1;
  while (nikunj--) {
    solve();
  }
  return 0;
}
