#include <bits/stdc++.h>
using namespace std;
int a[100010], n;
int judge(long long m) {
  long long k = m;
  for (int i = 0; i < n; ++i) {
    if (a[i] > m) return 0;
    k -= m - a[i];
  }
  if (k <= 0) return 1;
  return 0;
}
long long bsearch(long long l, long long r) {
  long long mid, k;
  while (l <= r) {
    mid = (l + r) / 2;
    if (judge(mid)) {
      k = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return k;
}
int main() {
  long long sum = 0ll;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  cout << bsearch(0ll, sum) << endl;
  return 0;
}
