#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int now = 1000;
  for (int i = 0; i < (int)(N); i++) {
    cin >> A[i];
  }
  for (int i = 0; i < (int)(N); i++) {
    if (i > 0 && A[i] > A[i - 1]) {
      now = A[i] * (now / A[i - 1]) + now % A[i - 1];
    }
  }
  cout << now << '\n';
  return 0;
}
