#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  int money = 1000, kabu = 0;
  for (int i = 0; i < n - 1; i++) {
    if (A[i] < A[i + 1]) {
      kabu = money / A[i];
      money -= kabu * A[i];
      money += kabu * A[i + 1];
      kabu = 0;
    }
  }
  cout << money << endl;
}
