#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int m = 1000;
  int stock = 0;
  int price = a[0];
  bool flag = false;
  for (int i = 1; i < n; i++) {
    if (flag == false && a[i - 1] < a[i]) {
      flag = true;
      stock = m / a[i - 1];
      m %= a[i - 1];
    }
    if (flag == true && a[i - 1] > a[i]) {
      flag = false;
      m += a[i - 1] * stock;
      stock = 0;
    }
  }
  m += a[n - 1] * stock;
  cout << m << endl;
  return 0;
}
