#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  deque<int> prices(n);
  for (int i = 0; i < n; i++) {
    cin >> prices[i];
  }
  int money = 1000;
  int stock = 0;
  int min, max;
  min = max = prices[0];
  for (int i = 0; i < n - 1; i++) {
    if (prices[i] < min) {
      min = prices[i];
    } else if (prices[i] > max) {
      max = prices[i];
    }
    if (prices[i] > prices[i + 1]) {
      int buy_num = money / min;
      money -= buy_num * min;
      stock += buy_num;
      money += stock * max;
      stock = 0;
      min = max = prices[i + 1];
    }
  }
  if (prices[n - 1] < min) {
    min = prices[n - 1];
  } else if (prices[n - 1] > max) {
    max = prices[n - 1];
  }
  int buy_num = money / min;
  money -= buy_num * min;
  stock += buy_num;
  money += stock * max;
  stock = 0;
  cout << money << endl;
  return 0;
}
