#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int yen = 1000, stock = 0;
  int nxt;
  cin >> nxt;
  while (--N) {
    int now = nxt;
    cin >> nxt;
    if (now < nxt) {
      stock += yen / now;
      yen -= yen / now * now;
    } else {
      yen += stock * now;
      stock = 0;
    }
  }
  cout << yen + stock * nxt << endl;
}
