#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\n";
  err(++it, args...);
}
long long v[100005], n;
bool isPossible(long long play) {
  long long sum = 0;
  for (int i = 0; i < n; ++i) {
    sum += v[i];
    if (sum >= n - 1) {
      sum -= (n - 1);
      --play;
    }
    if (play < 0) return 0;
  }
  if (sum > 0) {
    play -= ceil((double)sum / (n - 1));
  }
  return (play >= 0);
}
long long binarySearch(long long l, long long r) {
  long long ans = -1;
  while (l <= r) {
    long long mid = (l + r) >> 1LL;
    if (isPossible(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> v[i];
  sort(v, v + n);
  cout << binarySearch(v[n - 1], 1e18) << endl;
  return 0;
}
