#include <bits/stdc++.h>
using namespace std;
const int N = 85;
int n;
int price[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &price[i]);
  }
  int curMoney = 1000;
  int curStock = 0;
  for (int i = 0; i < n; i++) {
    if (price[i] <= price[i + 1]) {
      int stockBought = curMoney / price[i];
      int pay = stockBought * price[i];
      curStock += stockBought;
      curMoney -= pay;
    } else {
      if (curStock > 0) {
        curMoney += curStock * price[i];
        curStock = 0;
      }
    }
  }
  printf("%d\n", curMoney);
  return 0;
}
