#include <bits/stdc++.h>
using namespace std;
signed main() {
  int N;
  cin >> N;
  vector<int> v(N);
  for (auto& x : v) {
    cin >> x;
  }
  vector<int> dp(N);
  dp[0] = 1000;
  for (int i = 1; i < N; i++) {
    dp[i] = dp[i - 1];
    for (int j = 0; j < i; j++) {
      int x = dp[j] / v[j];
      int y = dp[j] % v[j];
      int z = v[i];
      dp[i] = max(dp[i], y + x * z);
    }
  }
  cout << dp[N - 1] << endl;
  return 0;
}
