#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  int n;
  cin >> n;
  vector<int> price(n);
  for (int i = 0; i < n; i++) cin >> price[i];
  int stock = 0, money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (price[i] < price[i + 1]) {
      stock += money / price[i];
      money -= (money / price[i]) * price[i];
    }
    if (price[i] > price[i + 1]) {
      money += stock * price[i];
      stock = 0;
    }
  }
  cout << money + stock * price[n - 1];
}
