#include <bits/stdc++.h>
using namespace std;
int n;
long long mx = 0, mn = 1e9 + 9, l, r, mid, ans = 1e18;
vector<long long> arr(1e5 + 5);
bool solve(long long rounds) {
  long long cnt = 0;
  for (int i = 1; i <= n; ++i) {
    cnt += rounds - arr[i];
  }
  return cnt >= rounds;
}
int main(void) {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    mx = max(mx, arr[i]);
    mn = min(mn, arr[i]);
  }
  l = mx;
  r = mx + mn;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (solve(mid)) {
      ans = min(ans, mid);
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << ans << "\n";
  return 0;
}
