#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, MIN = 0, MAX = 0;
  cin >> N;
  int A[N + 10];
  for (int i = 1; i <= N; ++i) {
    cin >> A[i];
  }
  int money = 1000;
  MIN = A[1];
  MAX = A[1];
  int MIN_day, MAX_day, num = 0;
  for (int i = 1; i < N; ++i) {
    MIN = min(A[i], A[i + 1]);
    MAX = max(A[i], A[i + 1]);
    if (A[i] < A[i + 1]) {
      MIN_day = i;
      MAX_day = i + 1;
    } else {
      MAX_day = i;
      MIN_day = i + 1;
    }
    if (MAX_day > MIN_day && money / MIN != 0) {
      money = money + (money / MIN) * (MAX - MIN);
      num += money / MIN;
    }
  }
  cout << money << endl;
  return 0;
}
