#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fi first
#define se second
int main(){
    double a;
    cin>>a;
    double arr[a];
    for (int i=0; i<a; i++) cin>>arr[i];
    double cur=1000, num=0;
    for (int i=0; i<a-1; i++){
        if (arr[i]<arr[i+1]) num=cur/arr[i], cur-=(cur/arr[i])*arr[i];
        else if (arr[i]>arr[i+1]) cur+=num*arr[i], num=0;
    }
    if (num!=0) cur+=arr[a-1]*num;
    cout<<cur<<endl;
}