#include <bits/stdc++.h>
using namespace std;
int dp[100];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n];
  dp[0] = 1000;
  dp[1] = 1000;
  dp[2] = 1000;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 0;
  if (n == 2) {
    if (a[1] > a[0]) {
      ans = 1000 - ((1000 / a[0]) * a[0]) + ((1000 / a[0]) * a[1]);
      cout << ans;
      return 0;
    } else {
      ans = 1000;
      cout << ans;
      return 0;
    }
  }
  for (int i = 2; i < n; i++) {
    dp[i] = max(dp[i], max((dp[i] - ((dp[i] / a[i - 2]) * a[i - 2]) +
                            ((dp[i] / a[i - 2]) * a[i])),
                           (dp[i] - ((dp[i] / a[i - 1]) * a[i - 1]) +
                            ((dp[i] / a[i - 1]) * a[i]))));
    dp[i + 1] = dp[i];
  }
  for (int i = 0; i < 100; i++) {
    ans = max(ans, dp[i]);
  }
  cout << ans;
  return 0;
}
