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