#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  int prin = 1000;
  int stock = 0;
  for (int i = 0; i < n - 1; i++) {
    if (arr[i + 1] - arr[i] <= 0) continue;
    stock = prin / arr[i];
    prin -= stock * arr[i];
    prin += stock * (arr[i + 1]);
  }
  cout << prin;
  return 0;
}
