#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);
  int money = 1000;
  int num = 0;
  bool flg = false;
  int prev = A.at(0);
  int min_value = A.at(0), max_value = A.at(0), min_pos = 0, max_pos = 0;
  for (int i = 1; i < N; i++) {
    if (prev < A.at(i)) {
      flg = true;
      min_value = min(min_value, A.at(i));
      if (min_value == A.at(i)) min_pos = i;
      max_value = max(max_value, A.at(i));
      if (max_value == A.at(i)) max_pos = i;
    } else if (prev > A.at(i)) {
      if (flg) {
        num = money / min_value;
        money -= num * A.at(min_pos);
        money += num * A.at(max_pos);
        flg = false;
        min_value = A.at(i);
        max_value = 0;
      }
    } else
      ;
    prev = A.at(i);
  }
  if (flg) {
    num = money / min_value;
    money -= num * A.at(min_pos);
    money += num * A.at(max_pos);
    flg = false;
    min_value = 200;
    max_value = 0;
  }
  cout << money << endl;
  return 0;
}
