#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 100;
long long arr[maxn];
bool test(long long mid, int n) {
  long long x = 0;
  for (int i = 0; i < n; i++) x += mid - arr[i];
  if (x >= mid) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long long sum = 0;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum = max(sum, arr[i]);
  }
  long long l = sum, r = 1e10;
  while (l != r) {
    long long mid = (l + r) / 2;
    if (test(mid, n))
      r = mid;
    else
      l = mid + 1;
  }
  cout << r << "\n";
}
