#include <bits/stdc++.h>
using namespace std;
const long long P = 1000000007;
const long long INF = 1LL << 60;
int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int main() {
  cout << fixed << setprecision(10);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (0); i < (N); ++i) cin >> A[i];
  int m = 1000;
  int k = 0;
  int y = 0;
  for (int i = (0); i < (N); ++i) {
    if (i == y) {
      m += A[i] * k;
      k = 0;
    }
    for (int j = i; j < N; j++) {
      if (A[j] > A[i]) {
        y = j;
        k += m / A[i];
        if (m > A[i]) {
          m -= k * A[i];
        }
        break;
      } else if (A[j] < A[i]) {
        break;
      }
    }
  }
  cout << m << endl;
  return 0;
}
