#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
long long a[N];
int n;
bool check(long long x) {
  long long sum = 0;
  for (int i = 2; i <= n; ++i) {
    if (x - a[i] < 0) return false;
    sum += x - a[i];
  }
  return (sum >= a[1]);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%I64d", &a[i]);
  sort(a + 1, a + n + 1);
  long long l = 0, r = (long long)1e14 + 1;
  while (l + 1 < r) {
    long long mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (check(l))
    printf("%I64d", l);
  else
    printf("%I64d", r);
  return 0;
}
