#include <bits/stdc++.h>
using namespace std;
void fast();
long long int ar[200005];
long long int n, a, b, c, d, m, k, q, mod;
vector<long long int> v;
long long int sum = 0;
long long int mini = INT_MAX;
long long int maxi = INT_MIN;
bool find(long long int mid) {
  if (mid < maxi) return false;
  if (mid * (n - 1) >= sum) return true;
  return false;
  long long int complete = 0;
  long long int partial = 0;
  for (long long int i = 0; i < n; i++) {
    long long int temp = ar[i];
    complete += temp / mid;
    partial += temp % mid;
    complete += partial / mid;
    partial %= mid;
  }
  if (complete < n - 1) return true;
  if (complete == n - 1 && partial == 0)
    return true;
  else
    return false;
}
int32_t main() {
  fast();
  long long int t = 1;
  while (t--) {
    cin >> n;
    for (long long int i = 0; i < n; i++) cin >> ar[i];
    ;
    for (long long int i = 0; i < n; i++) {
      mini = min(mini, ar[i]);
      sum += ar[i];
      maxi = max(maxi, ar[i]);
    }
    long long int pp;
    long long int s = mini;
    long long int e = sum;
    while (s <= e) {
      long long int mid = (s + e) / 2;
      bool ans = find(mid);
      if (ans) {
        pp = mid;
        e = mid - 1;
      } else
        s = mid + 1;
    }
    cout << pp;
  }
  return 0;
}
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
