#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  vector<long long> dp(n + 1, 1000);
  dp[0] = 1000;
  for (int i = 0; i < (n - 1); i++) {
    long long kabu = dp[i] / a[i], money = dp[i] - kabu * a[i];
    for (int j = (i + 1); j < (n); j++) {
      dp[j + 1] = max(dp[j + 1], money + kabu * a[j]);
    }
  }
  cout << dp[n] << "\n";
  return 0;
}
