#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool getmin(T *a, const T &b) {
  if (b < *a) {
    *a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool getmax(T *a, const T &b) {
  if (b > *a) {
    *a = b;
    return true;
  }
  return false;
}
template <class T>
inline void read(T *a) {
  char c;
  while (isspace(c = getchar())) {
  }
  bool flag = 0;
  if (c == '-')
    flag = 1, *a = 0;
  else
    *a = c - 48;
  while (isdigit(c = getchar())) *a = *a * 10 + c - 48;
  if (flag) *a = -*a;
}
const int mo = 1000000007;
template <class T>
T pow(T a, T b, int c = mo) {
  T res = 1;
  for (T i = 1; i <= b; i <<= 1, a = 1LL * a * a % c)
    if (b & i) res = 1LL * res * a % c;
  return res;
}
const int N = 100100;
int a[N], n;
bool check(long long x) {
  long long res = 0;
  for (int i = (1); i <= (n); ++i) {
    if (a[i] > x) return 0;
    res += x - a[i];
  }
  return res >= x;
}
int main() {
  cin >> n;
  for (int i = (1); i <= (n); ++i) read(a + i);
  long long l = 1, r = 1e12, res;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1, res = mid;
    else
      l = mid + 1;
  }
  cout << res << endl;
  return 0;
}
