#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n;
  vector<vector<long long>> dp;
  dp.push_back({1000, 0, 1000, 0});
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    vector<long long> cur(4), prev = dp[i];
    if (prev[3] < prev[0] / a) {
      cur[3] = prev[0] / a;
      cur[2] = prev[0] - cur[3] * a;
    } else {
      cur[3] = prev[3];
      cur[2] = prev[2];
    }
    if (prev[0] < cur[3] * a) {
      cur[0] = cur[3] * a + cur[2];
    } else {
      cur[0] = prev[0];
    }
    dp.push_back(cur);
  }
  cout << fixed << dp[n][0];
}
