#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long gcd(long long a, long long b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
long long inv(long long x) {
  long long res = 1;
  long long k = mod - 2;
  long long y = x;
  while (k) {
    if (k & 1) res = (res * y) % mod;
    y = (y * y) % mod;
    k /= 2;
  }
  return res;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int cur = 1000;
  int mi = 999;
  for (int i = 0; i < (int)(n); i++) {
    if (a[i] < mi)
      mi = a[i];
    else {
      cur = a[i] * (cur / mi) + cur % mi;
      mi = a[i];
    }
  }
  cout << cur << endl;
}
