#include <bits/stdc++.h>
using namespace std;
int n;
int money, stock;
void buyStock(int value) {
  stock += money / value;
  money %= value;
  return;
}
void sellStock(int value) {
  money += stock * value;
  stock = 0;
  return;
}
int main(void) {
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  money = 1000;
  stock = 0;
  for (int i = 0; i < n; i++) {
    if (i == n - 1) {
      sellStock(a[i]);
    } else {
      if (a[i] < a[i + 1])
        buyStock(a[i]);
      else if (a[i] > a[i + 1])
        sellStock(a[i]);
    }
  }
  cout << money << endl;
  return 0;
}
