#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll money = 1000;
int current_value = 0;
ll cnt = 0;
void sell(int value) {
  money += value * cnt;
  cnt = 0;
  current_value = 0;
  return;
}
void buy(int value) {
  int currnt_buy_cnt = money / value;
  cnt += currnt_buy_cnt;
  money -= currnt_buy_cnt * value;
  current_value = value;
  return;
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (long long i = 0; i < (n); ++i) {
    cin >> v[i];
  }
  for (long long i = 0; i < (n - 1); ++i) {
    buy(v[i]);
    if (v[i] < v[i + 1]) {
      continue;
    } else if (v[i] > v[i + 1]) {
      sell(v[i]);
    }
  }
  sell(v[n - 1]);
  cout << (money) << endl;
  ;
  return 0;
}
