#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 1e5 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int ans = 1000;
  long long maxi = ans;
  int temp = ans;
  int share = ans / arr[0];
  ans = ans - share * arr[0];
  int prev = arr[0];
  for (int i = 1; i < n; i++) {
    if (arr[i] > arr[i - 1]) {
      ans += share * (arr[i] - prev);
      temp = ans + share * prev;
      prev = arr[i];
      share = temp / arr[i];
    } else if (arr[i] < arr[i - 1]) {
      ans = temp;
      prev = arr[i];
      share = ans / arr[i];
      ans = ans - share * arr[i];
    }
  }
  cout << temp;
  return 0;
}
