#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> trades;
  vector<int> v(n);
  for (int &i : v) cin >> i;
  int stock = 0;
  int money = 1000;
  for (int i = 0; i < n - 1; ++i) {
    if (v[i] < v[i + 1]) {
      stock += money / v[i];
      money %= v[i];
    } else if (v[i] > v[i + 1]) {
      money += stock * v[i];
      stock = 0;
    }
  }
  cout << money + (stock * v[n - 1]) << "\n";
}
