#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000 + 7;
const double EPS = 1e-10;
int main() {
  int n;
  cin >> n;
  vector<long long> A(n);
  for (int i = (int)(0); i < (int)(n); i++) cin >> A[i];
  sort((A).begin(), (A).end());
  long long lb = 0;
  long long ub = 1LL << 40;
  while (ub - lb > 1) {
    long long mb = (ub + lb) / 2;
    bool ok = true;
    if (mb < A.back()) ok = false;
    long long sum = 0;
    for (int i = (int)(0); i < (int)(n); i++) sum += mb - A[i];
    if (ok && sum >= mb) {
      ub = mb;
    } else {
      lb = mb;
    }
  }
  cout << ub << endl;
  return 0;
}
