#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  int a[n], dp[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  dp[0] = 1000;
  for (long long i = 1; i <= n - 1; i++) {
    dp[i] =
        max(dp[i - 1], dp[i - 1] % a[i - 1] + a[i] * (dp[i - 1] / a[i - 1]));
  }
  cout << dp[n - 1];
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long test = 1;
  while (test--) solve();
  return 0;
}
