#include <bits/stdc++.h>
using namespace std;
template <typename T>
void cins(vector<T> V, int n) {
  for (int i = 0; i < n; i++) {
    cin >> V[i];
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int money = 1000;
  for (int i = 1; i < N; i++) {
    int stock = 0;
    if (A[i] > A[i - 1]) {
      stock = money / A[i];
    }
    money += (A[i - 1] + A[i]) * stock;
  }
  cout << money << endl;
  return 0;
}
