#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
int maxmoney = 1000;
int n = 0;
vector<int> buff(80, 0);
int f(int money, int number) {
  if (number > n) {
    if (maxmoney < money) {
      maxmoney = money;
    }
    return 0;
  }
  if (buff[number] < buff[number + 1]) {
    int diff = buff[number + 1] - buff[number];
    int num = money / buff[number];
    f(money + diff * num, number + 1);
    f(money, number + 1);
  }
  return 0;
}
int main() {
  cin >> n;
  vector<int> a(n, 0);
  for (int(i) = 0; (i) < (n); ++(i)) {
    cin >> a[i];
    buff[i] = a[i];
  }
  int money = 1000;
  f(money, 0);
  cout << maxmoney;
  return 0;
}
