#include <bits/stdc++.h>
using namespace std;
int direction[90];
bool change[90];
int main() {
  int N;
  cin >> N;
  vector<long long> stock_price(N + 1);
  for (int i = 1; i <= N; ++i) {
    cin >> stock_price[i];
  }
  for (int i = 0; i <= N; ++i) {
    direction[i] = -1;
  }
  direction[1] = 1;
  for (int i = 2; i <= N; ++i) {
    if (stock_price[i] > stock_price[i - 1]) {
      direction[i] = 0;
    } else if (stock_price[i] == stock_price[i - 1]) {
      direction[i] = 1;
    } else {
      direction[i] = 2;
    }
  }
  for (int i = 2; i <= N; ++i) {
    if (direction[i] != 1) {
      change[i] = true;
    } else {
      change[i] = false;
    }
  }
  long long current_stock = 0;
  long long money = 1000;
  for (int i = 2; i <= N; ++i) {
    if (change[i] == true) {
      if (stock_price[i] > stock_price[i - 1]) {
        current_stock = money / stock_price[i - 1];
        money = money % stock_price[i - 1];
      } else if (stock_price[i] < stock_price[i - 1]) {
        money += current_stock * stock_price[i - 1];
        current_stock = 0;
      }
    }
  }
  if (current_stock) {
    money += current_stock * stock_price[N];
  }
  cout << money << endl;
}
