#include <bits/stdc++.h>
const int N = 105;
using namespace std;
int dp[N], n, ar[N];
int32_t main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> ar[i];
  dp[0] = 1000;
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j++) {
      int cnt = dp[i - 1] / ar[i];
      int lef = dp[i - 1] - cnt * ar[i];
      int vl = lef + cnt * ar[j];
      dp[j] = max(dp[j], vl);
      dp[j] = max(dp[j], dp[j - 1]);
    }
  }
  cout << dp[n] << '\n';
  return 0;
}
