#include <bits/stdc++.h>
using namespace std;
int n, a[100000];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  long long l = 1, r = 2e9, m, ans, sum, f;
  while (l <= r) {
    m = (l + r) / 2;
    sum = 0;
    f = 0;
    for (int i = 0; i < n; i++)
      if (m >= a[i])
        sum += m - a[i];
      else
        f = 1;
    if (sum >= m && !f) {
      r = m - 1;
      ans = m;
    } else {
      l = m + 1;
    }
  }
  printf("%I64d", ans);
}
