#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long money = 1000LL;
  long long kabu = 0;
  cin >> n;
  vector<int> dp(n);
  for (int i = 0; i < n; i++) {
    cin >> dp[i];
  }
  int min = 300;
  int max = 0;
  bool turn = true;
  for (int i = 0; i < n; i++) {
    if (turn) {
      if (dp[i] > min) {
        kabu = money / min;
        money -= (long long)kabu * (long long)min;
        turn = false;
        min = 300;
      } else {
        min = dp[i];
      }
    } else {
      if (dp[i] < max) {
        money += (long long)kabu * (long long)max;
        kabu = 0;
        turn = true;
        max = 0;
      } else {
        max = dp[i];
      }
    }
  }
  if (!turn) {
    money += (long long)kabu * (long long)dp[n - 1];
  }
  printf("%lld", money);
  return 0;
}
