#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long vec[100100];
  scanf("%d", &n);
  long long suma = 0;
  long long m = -1;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &vec[i]);
    suma += vec[i];
    if (vec[i] > m) m = vec[i];
  }
  sort(vec, vec + n);
  long long menor = 0;
  long long mayor = 1000000000000;
  long long mid;
  while (menor < mayor) {
    mid = menor + (mayor - menor) / 2;
    suma = 0;
    for (int i = 0; i < n; i++) {
      suma += mid - vec[i];
    }
    if (suma >= mid && mid >= m) {
      mayor = mid;
    } else {
      menor = mid + 1;
      mid += 1;
    }
  }
  printf("%lld", mid);
  return 0;
}
