#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  int money = 1000;
  int stock = 0;
  bool is_down = true;
  for (int i = 0; i < N; ++i) {
    if (is_down && (A[i] < A[i + 1])) {
      stock += money / A[i];
      money -= stock * A[i];
      is_down = false;
    } else if (!is_down && (A[i] > A[i + 1])) {
      money += stock * A[i];
      stock = 0;
      is_down = true;
    }
  }
  money += stock * A[N - 1];
  cout << money << endl;
  return 0;
}
