#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, Money = 1000, stock = 0;
  cin >> N;
  int i, A[81];
  for (i = 1; i <= N; i++) cin >> A[i];
  for (i = 1; i <= N; i++) {
    Money += stock * A[i];
    stock = 0;
    if (i < N && A[i] < A[i + 1]) {
      stock = Money / A[i];
      Money -= stock * A[i];
    }
  }
  cout << Money << endl;
  return 0;
}
