#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  ll money = 1000;
  ll stock = 0;
  for (int i = 0; i < N; i++) {
    ll i_day_stock_price = A.at(i);
    if (i < N - 1) {
      ll i_next_day_stock_price = A.at(i + 1);
      if (i_next_day_stock_price > i_day_stock_price) {
        stock = money / i_day_stock_price;
        money = money - (i_day_stock_price * stock);
      } else if (i_next_day_stock_price < i_day_stock_price) {
        money = money + (i_day_stock_price * stock);
        stock = 0;
      }
    }
    if (i == N - 1) {
      money = money + (i_day_stock_price * stock);
      stock = 0;
    }
  }
  cout << money << endl;
  return 0;
}
