#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
unsigned long long factorial[1000004];
unsigned long long power(unsigned long long x, int y, int p) {
  unsigned long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
unsigned long long modInverse(unsigned long long n, int p) {
  return power(n, p - 2, p);
}
unsigned long long nc(unsigned long long n, int r, int p) {
  if (r == 0) return 1;
  return (factorial[n] * modInverse(factorial[r], p) % p *
          modInverse(factorial[n - r], p) % p) %
         p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n + 1];
  for (long long i = 0; i < n; i++) {
    cin >> a[i + 1];
  }
  int ans = 1000;
  int s = 0;
  int f = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i + 1]) {
      if (f == 1) {
        ans += (a[i] * s);
        s = 0;
        f = 0;
      } else {
        continue;
      }
    } else {
      if (f) {
        if (i == n - 1 && a[i] <= a[i + 1]) {
          ans += (s * a[i + 1]);
          s = 0;
        }
        continue;
      } else {
        f = 1;
        s += (ans / a[i]);
        ans %= a[i];
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
