#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int stocks = 0, money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (money > arr[i]) {
      for (int j = i; j < n; j++) {
        if (arr[j] > arr[i]) {
          stocks += money / arr[i];
          money = money - (money / arr[i]) * arr[i];
          break;
        } else if (arr[j] < arr[i])
          break;
      }
    } else {
      for (int j = i; j < n; j++) {
        if (arr[j] < arr[i]) {
          money += stocks * arr[i];
          stocks = 0;
          break;
        }
      }
    }
  }
  money += stocks * arr[n - 1];
  cout << money << "\n";
}
