#include <bits/stdc++.h>
using namespace std;
const long long MAXVAL = (long long)1e18 + 1;
const long long MOD = 1000000007ll;
const int INF = 1000000001;
long long poww(int x, long long pow) {
  if (pow == 0ll) return 1;
  if (pow == 1ll) return x % MOD;
  long long ans = poww(x, pow >> 1) % MOD;
  ans = (ans * ans) % MOD;
  if ((pow & 1) == 1) {
    ans = (ans * x) % MOD;
  }
  return ans % MOD;
}
long long gcd(long long x, long long y) {
  if (x == 0) return y;
  while (y) {
    x %= y;
    swap(x, y);
  }
  return x;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int q = 1;
  while (q-- > 0) {
    int n;
    cin >> n;
    int p[n];
    for (int i = 0; i < n; ++i) cin >> p[i];
    int curstocks = 0;
    int curmoney = 1000;
    for (int i = 0; i + 1 < n; ++i) {
      if (p[i + 1] > p[i]) {
        curstocks += curmoney / p[i];
        curmoney = curmoney % p[i];
        curmoney += curstocks * p[i + 1];
        curstocks = 0;
      }
    }
    cout << curmoney << "\n";
  }
  return 0;
}
