#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  long long ans = 1000;
  long long num = 0;
  vector<long long> A(0, 0);
  for (long long i = 0; i < (long long)(N); i++) {
    long long a;
    cin >> a;
    A.push_back(a);
  }
  vector<long long> B(0, 0);
  vector<long long> S(0, 0);
  int down_up = 0;
  int start = 0;
  for (long long i = 0; i < (long long)(N - 1); i++) {
    if (A[i] < A[i + 1]) {
      start = i;
      down_up = 1;
      B.push_back(i);
      break;
    } else if (A[i] > A[i + 1]) {
      start = i;
      down_up = 0;
      S.push_back(i);
      break;
    }
  }
  for (int i = start; i < N - 1; i++) {
    if (down_up == 1) {
      if (A[i] > A[i + 1]) {
        down_up = 0;
        S.push_back(i);
      }
      if (i == N - 2 && A[i] < A[i + 1]) {
        S.push_back(i + 1);
      }
    } else if (down_up == 0) {
      if (A[i] < A[i + 1]) {
        down_up = 1;
        B.push_back(i);
      }
      if (i == N - 2 && A[i] < A[i + 1]) {
        S.push_back(i + 1);
      }
    }
  }
  if (S.size() == 0 || B.size() == 0) {
    ans = ans;
  } else if (S[0] < B[0]) {
    for (int i = 0; i < S.size() - 1; i++) {
      num = ans / A[B[i]];
      ans -= num * A[B[i]];
      ans += num * A[S[i + 1]];
    }
  } else {
    for (int i = 0; i < S.size(); i++) {
      num = ans / A[B[i]];
      ans -= num * A[B[i]];
      ans += num * A[S[i]];
    }
  }
  cout << ans << endl;
}
