#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 8;
const long long MOD = 1e9 + 7;
const long long LLINF = 1e18;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = int(0); i < int(n); i++) cin >> a[i];
  int minv_i = 0, minv = a[0];
  vector<pair<int, int> > ans;
  for (int i = 1; i < n; ++i) {
    if (minv < a[i]) {
      ans.push_back(make_pair(minv_i, i));
    }
    minv = a[i];
    minv_i = i;
  }
  int money = 1000;
  for (auto i : ans) {
    int numStock = money / a[i.first];
    money -= numStock * a[i.first];
    money += numStock * a[i.second];
  }
  cout << money << endl;
}
