#include <bits/stdc++.h>
using namespace std;
long long n, a[100007];
long long sum = 0;
bool check(long long sm) {
  long long ss = 0;
  for (long long i = 0; i < n; i++)
    if (sm < a[i]) return false;
  for (long long i = 0; i < n; i++) ss += sm - a[i];
  return ss >= sm;
}
int main() {
  scanf("%I64d", &n);
  for (long long i = 0; i < n; i++) {
    scanf("%I64d", &a[i]);
  }
  long long lch = 0, rch = (1e14 + 50), mch;
  while (rch - lch > 1) {
    mch = (lch + rch) / 2;
    if (check(mch))
      rch = mch;
    else
      lch = mch;
  }
  printf("%I64d", rch);
  return 0;
}
