#include <bits/stdc++.h>
const int N = 1e5 + 10;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, a[105], mx = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  int ans = 1000 + (n * mx);
  cout << ans;
}
