#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
long long n;
vector<long long int> a;
long long check(long long x) {
  long long t = 0;
  for (long long int i = 0; i < n; i++) {
    if (a[i] > x) return 0;
    t += (x - a[i]);
  }
  return t >= x;
}
int solve() {
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.push_back(x);
  }
  long long low = 0, high = 2e9 + 5;
  while (low < high) {
    long long mid = low + (high - low) / 2;
    if (check(mid))
      high = mid;
    else
      low = mid + 1;
  }
  cout << low << "\n";
  return 0;
}
int main() {
  auto start = chrono::high_resolution_clock::now();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long test_cases = 1;
  while (test_cases--) solve();
  auto stop = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);
}
