#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (int)(N); i++) {
    cin >> A[i];
  }
  vector<long long> dp(N + 1, 0);
  dp[0] = 1000;
  for (int ni = 0; ni < (int)(N + 1); ni++)
    for (int i = 0; i < (int)(N + 1); i++) {
      if (ni <= i) continue;
      long long buy_count = dp[i] / A[i];
      long long next_money = dp[i];
      next_money -= buy_count * A[i];
      next_money += buy_count * A[ni];
      dp[ni] = max({dp[ni], next_money, dp[i]});
    }
  long long ans = 0;
  for (int i = 0; i < (int)(N + 1); i++) {
    ans = max(dp[i], ans);
  }
  cout << ans << endl;
  return 0;
}
