#include <bits/stdc++.h>
using namespace std;
int money = 1000, stocks = 0;
int n, a[200];
void buy(int i) {
  stocks += money / a[i];
  money -= (money / a[i]) * a[i];
}
void sell(int i) {
  money += stocks * a[i];
  stocks = 0;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int i = 0;
  while (i < n - 1) {
    if (a[i] < a[i + 1]) {
      buy(i);
      i++;
      sell(i);
    }
    i++;
  }
  cout << money;
  return 0;
}
