#include <bits/stdc++.h>
using namespace std;
const int N = 81;
const int M = 1001;
int n;
int a[N];
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  int dp[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    dp[i] = 1000;
  }
  int ans = 1000;
  for (int i = 0; i < n; i++) {
    int stoke = dp[i] / a[i];
    int rem = dp[i] % a[i];
    for (int j = i + 1; j < n; j++) {
      dp[j] = max(dp[j], stoke * a[j] + rem);
      dp[j] = max(dp[j], dp[i]);
    }
    ans = max(ans, dp[i]);
  }
  cout << ans << "\n";
}
