#include <bits/stdc++.h>
using namespace std;
using namespace std;
template <class T>
inline long long __gcd(T x, T y) {
  if (!y) return x;
  return __gcd(y, x % y);
}
long long n, i, a[100010];
long long m, low, high, ans;
inline long long F(long long x) {
  long long sum = 0;
  for (int i = 1; i <= n; ++i)
    if (a[i] > x)
      return -1;
    else {
      sum += x - a[i];
      if (sum > x) return sum;
    }
  return sum;
}
int main() {
  scanf("%I64d", &n);
  for (i = 1; i <= n; ++i) scanf("%I64d", &a[i]);
  sort(a + 1, a + n + 1);
  low = a[n];
  high = (1LL << 62);
  while (low <= high) {
    m = (low + high) >> 1;
    if (F(m) >= m)
      ans = m, high = m - 1;
    else
      low = m + 1;
  }
  printf("%I64d\n", ans);
  return 0;
}
