#include <bits/stdc++.h>  
using namespace std;
#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
 
int main() {
  int n;
  cin>> n;
  vector<int> v(n);
  rep(i,n){cin >> v[i];}
  int stock = 0;
  int money = 1000;
  rep(i, n){
 
    if(v[i] < v[i + 1]){
      stock = money / v[i];
      money = money % v[i];
    }
    
    if(v[i] >= v[i + 1]){
      money += stock * v[i];
      stock = 0;
    }
  }
  money = money + stock * v[n - 1];
  cout<< money <<endl;
}