#include <bits/stdc++.h>
using namespace std;
long long A[100006], n;
bool isPossible(long long r) {
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    sum += (r - A[i]);
  }
  if (sum >= r) {
    return true;
  }
  return false;
}
int main() {
  long long high = 0, low = 0;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> A[i];
    high += A[i];
    low = max(low, A[i]);
  }
  long long ans = high;
  while (low <= high) {
    long long mid = (low + high) / 2;
    if (isPossible(mid)) {
      ans = mid;
      high = mid - 1;
    } else {
      low = mid + 1;
    }
  }
  cout << ans << endl;
}
