#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  int i = 0;
  int result = 1000;
  while (i < n - 1) {
    while (i < n - 1 && arr[i] >= arr[i + 1]) i++;
    if (i == n - 1) break;
    int bought = i++;
    while (i < n && arr[i] >= arr[i - 1]) i++;
    int sold = i - 1;
    int totalStocks = result / arr[bought];
    result = result % arr[bought];
    result += totalStocks * arr[sold];
  }
  cout << result;
  return 0;
}
