#include <bits/stdc++.h>
using namespace std;
using pll = pair<long long, long long>;
using vl = vector<long long>;
using vll = vector<vl>;
using vpll = vector<pll>;
struct Edge {
  long long to;
  long long cost;
};
using Graph = vector<vector<Edge>>;
const long long MOD = 1000000007;
const double PI = 2.0 * asin(1.0);
const long long INF = 1L << 60;
string abc = "abcdefghijklmnopqrstuvwxyz";
string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const long long MAX = (long long)pow(10, 7);
long long n;
vl a;
int solve() {
  cin >> n;
  (a).resize(n);
  long long ma = 0;
  long long ma_ite = -1;
  for (long long i = (0); i < (n); i++) {
    cin >> a[i];
    if (ma < a[i]) {
      ma = a[i];
      ma_ite = i;
    }
  }
  vll dp(n + 1, vl(2, 0));
  dp[0][0] = 1000;
  dp[0][1] = 0;
  long long now_rate = a[0];
  for (long long i = (0); i < (n - 1); i++) {
    if (now_rate < a[i + 1]) {
      dp[i][1] += dp[i][0] / a[i];
      dp[i][0] = dp[i][0] % a[i];
      dp[i + 1][0] = dp[i][0] + dp[i][1] * a[i + 1];
      dp[i + 1][1] = 0;
      now_rate = a[i + 1];
    } else {
      dp[i][0] = dp[i][0] + dp[i][1] * a[i];
      dp[i][1] = 0;
      dp[i + 1][1] += dp[i][0] / a[i + 1];
      dp[i + 1][0] = dp[i][0] % a[i + 1];
    }
  }
  cout << dp[n - 1][0] + dp[n - 1][1] * a[n - 1] << endl;
  return 0;
}
int main() {
  cout << std::fixed << std::setprecision(10);
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int end_solve = solve();
  return end_solve;
}
