#include <bits/stdc++.h>
using namespace std;
int main(int ac, char* av[]) {
  int N;
  cin >> N;
  vector<int> A;
  vector<int> cmd;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  int nxtstate = 1;
  for (int i = 0; i < N - 1; i++) {
    if (nxtstate == 1) {
      if (A[i] < A[i + 1]) {
        cmd.push_back(1);
        nxtstate = -1;
      } else {
        cmd.push_back(0);
      }
    } else {
      if (A[i] > A[i + 1]) {
        cmd.push_back(-1);
        nxtstate = 1;
      } else {
        cmd.push_back(0);
      }
    }
  }
  cmd.push_back(-1);
  int stocks = 0;
  int money = 1000;
  for (int i = 0; i < N; i++) {
    if (cmd[i] == 1) {
      stocks += money / A[i];
      money -= A[i] * stocks;
    } else if (cmd[i] == -1) {
      money += stocks * A[i];
      stocks = 0;
    }
  }
  cout << money << endl;
  return 0;
}
