#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  long long s = 0;
  for (int i = 0; i < n; ++i) s += a[i];
  long long l = 1, r = s;
  while (l < r) {
    long long m = l + (r - l) / 2;
    int count = 0;
    for (int i = 0; i < n; ++i)
      if (m >= a[i]) count++;
    long long diff = 0;
    if (count == n) {
      for (int i = 0; i < n; ++i) {
        diff += m - a[i];
      }
    }
    if (diff >= m)
      r = m;
    else
      l = m + 1;
  }
  cout << l << endl;
  return 0;
}
