#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const int MOD = 1000000009;
const long long INF = 1LL << 60;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];
  ll M = 1000;
  for (int i = 0; i < N; ++i) {
    int maxa = A[i];
    int memo = -1;
    bool flg = false;
    for (int j = i + 1; j < N; ++j) {
      if (A[j] >= maxa) {
        maxa = A[j];
        memo = j;
        flg = true;
      }
      if (flg == true && maxa > A[j]) break;
    }
    if (memo != -1) {
      int kabuko = M / A[i];
      M = M % A[i];
      M = M + kabuko * maxa;
      i = memo;
    }
  }
  cout << M << endl;
  return 0;
}
