#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int min_in_trend = INT_MAX;
  int max_in_trend = INT_MIN;
  int money = 1000;
  int prev = -1;
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    if (A < prev) {
      money += (prev - min_in_trend) * (int)(money / min_in_trend);
      min_in_trend = INT_MAX;
    }
    if (A < min_in_trend) {
      min_in_trend = A;
    }
    prev = A;
  }
  if (prev > min_in_trend) {
    money += (prev - min_in_trend) * (int)(money / min_in_trend);
  }
  cout << money << endl;
}
