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