#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];
  long total_money = 1000;
  int stokes = 0;
  for (int i = 0; i < n - 1; i++) {
    if (arr[i + 1] > arr[i]) {
      stokes += total_money / arr[i];
      total_money = total_money % arr[i];
    } else {
      int temp = stokes * arr[i];
      stokes = 0;
      total_money += temp;
    }
  }
  total_money += stokes * arr[n - 1];
  cout << total_money << endl;
  return 0;
}
