#include <bits/stdc++.h>
using namespace std;
int stockBuySell(int price[], int n) {
  int money = 1000;
  int stock;
  int i = 0;
  while (i < n - 1) {
    while ((i < n - 1) && (price[i + 1] <= price[i])) i++;
    if (i == n - 1) break;
    stock = money / price[i];
    money -= stock * price[i];
    i++;
    while ((i < n) && (price[i] >= price[i - 1])) i++;
    money += stock * price[i - 1];
    stock = 0;
  }
  return max(1000, money);
}
int main() {
  int n;
  cin >> n;
  int price[n];
  for (int i = 0; i < n; i++) cin >> price[i];
  cout << stockBuySell(price, n) << endl;
  return 0;
}
