#include <bits/stdc++.h>
using namespace std;
int main() {
  int d, s = 0, yen = 1000;
  cin >> d;
  int i = 1, cur, nxt;
  cin >> cur;
  do {
    cin >> nxt;
    if (s == 0) {
      if (nxt > cur) {
        s = yen / cur;
        yen -= s * cur;
      }
    } else {
      if (nxt < cur) {
        yen += s * cur;
        s = 0;
      }
    }
    cur = nxt;
  } while (++i < d);
  yen += s * nxt;
  cout << yen;
  return 0;
}
