#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, k, ing[N], hv[N], gamesToPlay[N];
bool check(long long int games) {
  long long int canMod = 0;
  for (int i = 0; i < n; i++) {
    canMod += (games - gamesToPlay[i]);
    if (canMod >= games) {
      return true;
    }
  }
  return false;
}
int main() {
  cin >> n;
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> gamesToPlay[i];
    mx = max(mx, gamesToPlay[i]);
  }
  long long int ans = 1e16;
  long long int l = mx, r = 1e16;
  while (l <= r) {
    long long int mid = (l + r) / 2;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
