#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const int inf = 1000000007;
const int MOD = 1000000007;
signed main() {
  int n;
  cin >> n;
  vector<int> a(n + 1, 0);
  for (int i = 1; i <= n; ++i) cin >> a[i];
  vector<vector<int>> dp(n + 1, vector<int>(3, 0));
  dp[0][0] = 1000;
  for (int i = 1; i <= n; ++i) {
    dp[i][0] = max(dp[i - 1][0], dp[i - 1][1] + dp[i - 1][2] * a[i]);
    dp[i][1] = dp[i][0] % a[i];
    dp[i][2] = dp[i][0] / a[i];
  }
  cout << dp[n][0] << "\n";
  return 0;
}
