#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int long long> d(n);
  for (int i = 0; i < (int)(n); i++) cin >> d.at(i);
  int money = 1000;
  int long long stock = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (d.at(i) < d.at(i + 1)) {
      stock = money / d.at(i);
      money %= d.at(i);
      money += stock * d.at(i + 1);
    }
  }
  cout << money;
}
