#include <bits/stdc++.h>
using namespace std;
const int maxn = 81;
int A[maxn];
int main() {
  int N;
  cin >> N;
  int money = 1000;
  int n_stock = 0;
  for (int i = 0; i < N; i++) cin >> A[i];
  for (int i = 0; i < N; i++) {
    if (i == 0) {
      if (A[i] < A[i + 1]) {
        int buyin = money / A[i];
        money = money - buyin * A[i];
        n_stock += buyin;
      }
    } else if (i != N - 1) {
      if (A[i] < A[i + 1] && A[i] <= A[i - 1]) {
        int buyin = money / A[i];
        money = money - buyin * A[i];
        n_stock += buyin;
      } else if (A[i] >= A[i - 1] && A[i] > A[i + 1]) {
        money = money + A[i] * n_stock;
        n_stock = 0;
      }
    } else {
      money = money + A[i] * n_stock;
    }
  }
  cout << max(money, 1000);
}
