#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[85] = {0};
  for (int i = 1; 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;
}
