#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[80];
  for (int i = 0; i < n; i++) cin >> a[i];
  int dp[90];
  dp[0] = 1000;
  for (int i = 1; i <= n; i++) {
    int hi = 0;
    for (int j = 0; j < i; j++) {
      int buy = dp[j] / a[j];
      int money = dp[j] % a[j];
      money += a[i] * buy;
      hi = max(hi, money);
      hi = max(hi, dp[j]);
    }
    dp[i] = hi;
  }
  cout << dp[n] << endl;
}
