#include <bits/stdc++.h>
using namespace std;
string num_to_str(int n) {
  string res = "";
  if (!n) return "0";
  while (n) {
    res += ((n % 10) + '0');
    n /= 10;
  }
  reverse(res.begin(), res.end());
  return res;
}
int str_to_num(string s) {
  int res = 0, p = 1;
  for (int i = s.size() - 1; i >= 0; i--) res += ((s[i] - '0') * p), p *= 10;
  return res;
}
int n;
long long a[100001], Max;
bool ok(unsigned long long mid) {
  long long c = mid - a[0];
  for (int i = 1; i < n; i++) {
    if (a[i] > mid) return 0;
    c += (mid - a[i]);
  }
  return c >= mid;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], Max = max(a[i], Max);
  sort(a, a + n);
  unsigned long long l = Max, h = 1e18, mid = 0, res = 0;
  while (l <= h) {
    mid = (l + h) / 2;
    if (ok(mid))
      res = mid, h = mid - 1;
    else
      l = mid + 1;
  }
  cout << res << endl;
  return 0;
}
