#include <bits/stdc++.h>
using namespace std;
long long dp[81][200];
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  bool buying = true;
  int bp = 200, sp = 0, coin = 1000, stocks = 0;
  for (auto t : a) {
    if (buying) {
      if (t > bp) {
        buying = false;
        stocks += coin / bp;
        coin %= bp;
        sp = t;
        bp = 300;
      } else {
        bp = t;
      }
    } else {
      if (t < sp) {
        buying = true;
        bp = t;
        coin += sp * stocks;
        stocks = 0;
        sp = 0;
      } else {
        sp = t;
      }
    }
  }
  if (stocks) coin += sp * stocks;
  cout << coin << endl;
  return 0;
}
