#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 1, 0);
  int i;
  for (i = 0; i < N; i++) cin >> A[i];
  int money = 1000, kabu = 0;
  for (i = 0; i < N; i++) {
    if (A[i] >= A[i + 1]) {
      money += kabu * A[i];
      kabu = 0;
    } else {
      kabu += money / A[i];
      money %= A[i];
    }
  }
  cout << money << endl;
}
