#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a;
int dp[100] = {};
int diff[100] = {};
int divi(int, int);
int suma(int, int);
int divi(int a, int b) { return (a - (a % b)) / b; }
int suma(int a, int b) {
  int t = 0;
  for (int i = a; i < (b + 1); i++) t += diff[i];
  return t;
}
void make(int d) {
  int sum = 0;
  int k = (int)divi(dp[d - 1], a[d - 1]) * diff[d - 1] + dp[d - 1];
  dp[d] = max(dp[d - 1], k);
  for (int i = 2; i < d - 1; i++) {
    sum = suma(d - 1, d - i);
    k = divi(dp[d - i], a[d - i]) * sum + dp[d - i];
    dp[d] = max(dp[d], 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;
}
