#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;


int main (){
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i, n) cin >> a[i];
  int asset = 1000;
  int stock = 0;
  
  rep(i, n-1){
    if(a[i] < a[i+1]){
      int add = asset / a[i];
      stock += add;
      asset -= a[i] * add;
    }if(a[i] > a[i+1]){     
      if(a[i-1] < a[i]){
        asset += a[i] * stock;
        stock = 0;
      }
      int t =i;
      while(a[t-1] == a[t]){
        t--;
        if(a[i-1] < a[i]){
        asset += a[i] * stock;
        stock = 0;
      }
    }
  }
  asset += a[n-1] * stock;
  
  cout << asset << endl; 
  
  return 0;
}