#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
signed main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int money = 1000;
  for (int i = 0; i < N; i++) {
    int stocks = 0;
    if (A[i] < A[i + 1]) stocks = money / A[i];
    money += (A[i + 1] - A[i]) * stocks;
  }
  cout << money << endl;
  return 0;
}
