#include <bits/stdc++.h>
const int N = 105;
using namespace std;
int dp[N], n, ar[N];
int32_t main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> ar[i];
  dp[1] = 1000;
  for (int i = 1; i <= n; i++) {
    int j = i + 1;
    int cnt = dp[i] / ar[i];
    int lef = dp[i] - cnt * ar[i];
    int vl = lef + cnt * ar[j];
    dp[j] = max(dp[j], vl);
    dp[j] = max(dp[j], dp[j - 1]);
  }
  cout << dp[n] << '\n';
  return 0;
}
