#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int arr[N];
  for (int i = 0; i < N; i++) cin >> arr[i];
  int ans = 1000;
  for (int i = 0; i < N; i++) {
    int mini = 1e8;
    while (i < N && arr[i] <= mini) mini = arr[i++];
    int maks = 0;
    while (i < N && arr[i] >= maks) maks = arr[i++];
    if (maks) ans += maks * (ans / mini) - mini * (ans / mini);
  }
  cout << ans << endl;
}
