#include <bits/stdc++.h>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
const int mmax = 80;
long long n, money, stock, price[mmax + 10];
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> price[i];
  }
  money = 1000;
  stock = 0;
  for (int i = 1; i <= n - 1; ++i) {
    if (price[i + 1] > price[i]) {
      stock += money / price[i];
      money = money % price[i];
    } else {
      money += price[i] * stock;
      stock = 0;
    }
  }
  return 0;
}
