#include <bits/stdc++.h>
using namespace std;
int dp[81];
vector<int> a;
inline int sub(int buy, int sell) { return a[sell - 1] - a[buy - 1]; }
int main() {
  int n;
  cin >> n;
  a = vector<int>(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    dp[i] = 1000;
  }
  dp[n] = 1000;
  for (int i = 0; i < n; ++i) {
    for (int j = 1; i + j < n; ++j) {
      dp[i + j] = max(dp[i], dp[i] + dp[i] / a[i] * (a[i + j] - a[i]));
    }
  }
  cout << dp[n - 1] << endl;
  return 0;
}
