#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  vector<int> dp(n + 1);
  dp[1] = 1000;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1];
    for (int j = 1; j <= i - 1; j++) {
      int num = dp[j] / a[j];
      int tot = dp[j] - (num * a[j]) + (num * a[i]);
      dp[i] = max(dp[i], tot);
    }
  }
  cout << dp[n] << endl;
  return 0;
}
