#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long dp[100];
  memset(dp, 0, sizeof(dp));
  dp[1] = 1000;
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j < i; j++) {
      dp[i] = max(dp[i], dp[j] % a[j] + dp[j] / a[j] * a[i]);
      dp[i] = max(dp[i], dp[j]);
    }
  }
  cout << dp[n] << endl;
  return 0;
}
