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