#include <bits/stdc++.h>
using namespace std;
int n;
long long a[100001];
bool check(long long t) {
  long long i, j;
  long long x = t, sum = 0;
  for (i = 0; i < n; i++) {
    sum += (t - a[i]);
    if (sum >= t) return true;
  }
  return false;
}
void solve() {
  sort(a, a + n);
  long long mid, l = a[n - 1], r = a[n - 1] + a[0];
  while (r - l > 1) {
    mid = l + (r - l) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (check(l))
    cout << l << endl;
  else
    cout << r << endl;
}
int main(void) {
  int i;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; i++) scanf("%I64d", &a[i]);
    solve();
  }
  return 0;
}
