#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 1;
long long money = 1000;
void stockBuySell(int price[], int n) {
  if (n == 1) return;
  int i = 0;
  while (i < n - 1) {
    while ((i < n - 1) && (price[i + 1] <= price[i])) i++;
    if (i == n - 1) break;
    int buy = i++;
    while ((i < n) && (price[i] >= price[i - 1])) i++;
    int sell = i - 1;
    int bought = money / price[buy];
    int usedmoney = bought * price[buy];
    money -= usedmoney;
    int sold = bought;
    int earnedmoney = sold * price[sell];
    money += earnedmoney;
  }
}
int main() {
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }
    stockBuySell(a, n);
    cout << money;
  }
  return 0;
}
