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