#include <bits/stdc++.h>
using namespace std;
const int up = 1;
const int flat = 0;
const int down = -1;
const int unknown = -2;
int main() {
  uint N;
  cin >> N;
  vector<int> A(N, 0);
  for (auto &a : A) cin >> a;
  int money = 1000;
  int nKabu = 0;
  int dir = flat;
  for (size_t i = 0; i < A.size() - 1; ++i) {
    if (A[i] > A[i + 1]) {
      if ((dir == flat) || (dir == up)) {
        if (nKabu > 0) {
          int addMoney = nKabu * A[i];
          money += addMoney;
          nKabu = 0;
        }
      }
      dir = down;
    } else if (A[i] < A[i + 1]) {
      if ((dir == flat) || (dir == down)) {
        int addKabu = money / A[i];
        nKabu += addKabu;
        money -= addKabu * A[i];
      }
      dir = up;
    } else {
      dir = flat;
    }
  }
  if (nKabu > 0) {
    int addMoney = nKabu * A[A.size() - 1];
    money += addMoney;
    nKabu = 0;
  }
  cout << money << endl;
}
