#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  vector<vector<int>> dp(n + 1, vector<int>(2));
  dp[1][0] = 1000;
  dp[1][1] = 1000 / v[0];
  int sdacha = 1000 % v[0];
  for (int i = 2; i <= n; i++) {
    dp[i][0] = max(sdacha + dp[i - 1][1] * v[i - 1], dp[i - 1][0]);
    if (dp[i - 1][1] <= dp[i - 1][0] / v[i - 1]) {
      sdacha = dp[i - 1][0] % v[i - 1];
    } else
      sdacha = 0;
    dp[i][1] = max(dp[i - 1][0] / v[i - 1], dp[i - 1][1]);
  }
  cout << dp[n][0];
}
