#include <bits/stdc++.h>
using namespace std;
struct cww {
  cww() {
    ios::sync_with_stdio(false);
    cin.tie(0);
  }
} star;
const long long INF = numeric_limits<long long>::max();
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = long long(0); i < long long(n); ++i) cin >> a[i];
  int amount = 1000, num = 0;
  for (long long i = long long(0); i < long long(n - 1); ++i) {
    if (a[i] < a[i + 1]) {
      num += amount / a[i];
      amount -= num * a[i];
    } else if (a[i] > a[i + 1]) {
      amount += num * a[i];
      num = 0;
    }
  }
  if (num > 0) amount += num * a[n - 1];
  cout << amount << endl;
  return 0;
}
