#include <bits/stdc++.h>
using namespace std;
int n;
long long a[100005], maxx;
bool issOK(long long x) {
  long long cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (x > a[i]) cnt += x - a[i];
    if (cnt >= x) return 1;
  }
  if (cnt >= x)
    return 1;
  else
    return 0;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    maxx = max(maxx, a[i]);
  }
  long long l = maxx, r = (long long)1e16;
  while (r - l > 3) {
    long long mid = (l + r) / 2;
    if (issOK(mid))
      r = mid;
    else
      l = mid;
  }
  for (long long i = l; i <= r; i++) {
    if (issOK(i)) {
      cout << i;
      break;
    }
  }
  return 0;
}
