#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  vector<int> flg(N);
  int money = 1000;
  int num = 0;
  int pos_mem = 0;
  int prev = A.at(0);
  int cnt = 1;
  for (int i = 0; i < N; i++) {
    if (prev < A.at(i)) {
      flg.at(i) = 1;
      flg.at(i - 1) = -1;
      pos_mem = i - 1;
      cnt++;
      i++;
    } else if (prev > A.at(i)) {
      if (cnt % 2 != 0) {
        flg.at(pos_mem) = 0;
        cnt = 1;
      }
    } else
      ;
    if (i < N) prev = A.at(i);
  }
  for (int i = 0; i < N; i++) {
    if (flg.at(i) == -1) {
      num = money / A.at(i);
      money -= num * A.at(i);
    } else if (flg.at(i) == 1) {
      money += num * A.at(i);
    } else
      ;
  }
  cout << money << endl;
  return 0;
}
