#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T CHMAX(T& a, const T b) {
  return a = (a < b) ? b : a;
}
template <class T>
inline T CHMIN(T& a, const T b) {
  return a = (a > b) ? b : a;
}
const long double EPS = 1e-10;
const long long INF = 1e18;
const long double PI = acos(-1.0L);
const long long MOD = 1000000007;
long long int dp_stock[100];
long long int dp_stock_mod_money[100];
long long int dp_money[100];
int main(void) {
  long long int n;
  vector<long long int> input;
  cin >> n;
  for (long long int i = 0; i < (n); i++) {
    long long int tmp;
    cin >> tmp;
    input.push_back(tmp);
  }
  dp_money[0] = 1000;
  dp_stock[0] = (dp_money[0] / input[0]);
  dp_stock_mod_money[0] = dp_money[0] % input[0];
  for (long long int i = 0; i < (n); i++) {
    if (i == 0) {
      continue;
    }
    CHMAX(dp_money[i], dp_money[i - 1]);
    CHMAX(dp_money[i],
          (dp_stock[i - 1] * input[i]) + dp_stock_mod_money[i - 1]);
    long long int stock_base = dp_stock[i - 1];
    long long int stock_mod_base = dp_stock_mod_money[i];
    long long int stock_tmp = dp_money[i - 1] / input[i];
    long long int stock_mod_tmp = dp_money[i - 1] % input[i];
    if (stock_tmp > stock_base) {
      dp_stock[i] = stock_tmp;
      dp_stock_mod_money[i] = stock_mod_tmp;
    } else if (stock_tmp == stock_base && stock_mod_tmp > stock_mod_base) {
      dp_stock[i] = stock_tmp;
      dp_stock_mod_money[i] = stock_mod_tmp;
    } else {
      dp_stock[i] = stock_base;
      dp_stock_mod_money[i] = stock_mod_base;
    }
  }
  cout << dp_money[n - 1] << endl;
  return 0;
}
