#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
int main() {
  long long i, x, l, ans, tmp, n;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  tmp = (n - 2) * v[n - 1];
  if (v[n - 2] != v[0]) {
    for (i = n - 2; i >= 0; i--) tmp -= v[i] - v[0];
  }
  ans = v[n - 1] + max((long long)0, (v[0] - (tmp / (n - 1))));
  cout << ans << endl;
  return 0;
}
