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