#include <bits/stdc++.h>
using namespace std;
const long long int N = 1000005;
const long long int M = 1e6 + 10;
const long long int mod = 998244353;
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modinv(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int ncr(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  int n1 = n;
  long long int fac[n1 + 1];
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % p;
  return (fac[n] * modinv(fac[r], p) % p * modinv(fac[n - r], p) % p) % p;
}
bool isPowerOfTwo(int x) { return (x && !(x & (x - 1))); }
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  int x = 0, a, b, c = 0, k = 1000, n, i;
  cin >> n;
  int arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  for (i = 0; i < n - 1; i++) {
    while (i < n - 1 and arr[i] >= arr[i + 1]) i++;
    if (i < n - 1) {
      c = k / arr[i];
      k = k - c * arr[i];
      c = c * arr[i + 1];
      k += c;
    } else
      break;
  }
  cout << k;
  return 0;
}
