#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long start = a[0];
  int sz = a.size();
  long long money = 1000, stock = 0;
  for (int i = 1; i < sz; i++) {
    long long cur = a[i];
    if (start < cur) {
      stock = money / start;
      money = money % start;
      money = money + (stock * cur);
      stock = 0;
      start = cur;
    } else if (start > cur) {
      cur = start;
    }
  }
  cout << money << endl;
  return 0;
}
