#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int a[N];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  int ans = a[n - 1];
  int s = 0;
  for (int i = 0; i < n; i++) {
    s += ans - a[i];
    if (s >= ans) break;
  }
  while (s < ans) {
    int t = (ans - s) / n + (bool)((ans - s) % n);
    ans += t;
    s += t * n;
  }
  printf("%d\n", ans);
  return 0;
}
