#include <bits/stdc++.h>
using namespace std;
int a[100001];
int n;
bool ok(long long x) {
  long long s = 0;
  for (int i = 0; i < n; ++i) {
    s += x - a[i];
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] > s - (x - a[i])) return false;
  }
  return true;
}
int main() {
  int maxx = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    maxx = max(maxx, a[i]);
  }
  long long end = (long long)(maxx) * (long long)(n);
  long long begin = maxx;
  while (begin < end) {
    long long mid = begin + (end - begin) / 2;
    if (ok(mid))
      end = mid;
    else
      begin = mid + 1;
  }
  cout << begin << endl;
  return 0;
}
