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