#include <bits/stdc++.h>
using namespace std;
int main() {
  int days;
  cin >> days;
  vector<int> rates(days);
  for (int i = 0; i < days; i++) {
    cin >> rates.at(i);
  }
  vector<int> todos(days);
  for (int i = days - 1; 0 <= i; i--) {
    if (i == days - 1) {
      todos.at(i) = 0;
    } else if (rates.at(i) <= rates.at(i + 1)) {
      todos.at(i) = 1;
    } else {
      todos.at(i) = 0;
    }
  }
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < days; i++) {
    switch (todos.at(i)) {
      case 0: {
        money += stock * rates.at(i);
        stock = 0;
        break;
      }
      case 1: {
        int amount = money / rates.at(i);
        money -= rates.at(i) * amount;
        stock += amount;
        break;
      }
      default:
        break;
    }
  }
  cout << money << endl;
  return 0;
}
