#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> r(n);
  for (int i = 0; i < (n); ++i) cin >> r[i];
  vector<int> r1, r2;
  bool large = true;
  for (int i = 0; i < n - 1; ++i) {
    if (large && r[i] < r[i + 1]) {
      large = false;
      r1.push_back(r[i]);
    } else if (!large && r[i] > r[i + 1]) {
      large = true;
      r1.push_back(r[i]);
    }
  }
  if (r1.size() != 0) {
    if (!large && r1[r1.size() - 1] < r[n - 1])
      r1.push_back(r[n - 1]);
    else if (large && r1[r1.size() - 1] > r[n - 1])
      r1.push_back(r[n - 1]);
  }
  int ans = 1000;
  int kab = 0;
  int yen = 1000;
  int x = 0;
  if (r1.size() > 0 && r1.size() % 2 == 1) x = 1;
  for (int i = 0; i < (r1.size() - x); ++i) {
    if (i % 2 == 0) {
      kab = yen / r1[i];
      yen = yen - kab * r1[i];
    } else {
      yen += kab * r1[i];
    }
  }
  ans = max(ans, yen);
  large = false;
  for (int i = 0; i < n - 1; ++i) {
    if (large && r[i] < r[i + 1]) {
      large = false;
      r2.push_back(r[i]);
    } else if (!large && r[i] > r[i + 1]) {
      large = true;
      r2.push_back(r[i]);
    }
  }
  if (r2.size() != 0) {
    if (!large && r2[r2.size() - 1] < r[n - 1])
      r2.push_back(r[n - 1]);
    else if (large && r2[r2.size() - 1] > r[n - 1])
      r2.push_back(r[n - 1]);
  }
  kab = 0;
  yen = 1000;
  x = 0;
  if (r2.size() > 0 && r2.size() % 2 == 0) x = 1;
  for (int i = 1; i < r2.size() - x; i++) {
    if (i % 2 == 1) {
      kab = yen / r2[i];
      yen = yen - kab * r2[i];
    } else {
      yen += kab * r2[i];
    }
  }
  ans = max(ans, yen);
  cout << ans << endl;
}
