#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a;
int dp[82] = {};
int diff[82] = {};
int make(int d) {
  int k = dp[d - 1] / a[d - 1] * diff[d - 1] + dp[d - 1];
  dp[d] = max(dp[d - 1], k);
  if (d < n) make(d + 1);
}
int main() {
  dp[0] = 1000;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    a.push_back(t);
  }
  for (int i = 0; i < n - 1; i++) {
    diff[i] = a[i + 1] - a[i];
  }
  make(1);
  cout << dp[n] << endl;
}
