#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
using P = pair<long long, long long>;
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long mod_pow(long long x, long long y) {
  long long tmp = x, res = 1;
  while (y) {
    if (y % 2) {
      res = res * tmp % MOD;
    }
    y >>= 1;
    tmp = tmp * tmp % MOD;
  }
  return res;
}
long long nature(long long a) {
  if (a >= 0) {
    return (a);
  } else {
    return (-1 * a);
  }
}
long long prime(long long a) {
  if (a == 2) {
    return 1;
  } else if (a % 2 == 0 || a == 1) {
    return 0;
  }
  for (long long i = 3; i * i <= a; i += 2) {
    if (a % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  int N, check = 0, maxA = 0;
  cin >> N;
  vector<int> A(N);
  int lasta = 0;
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
    maxA = max(maxA, A.at(i));
  }
  int count;
  int money;
  money = 1000;
  count = 0;
  int minimum = A.at(0);
  for (int i = 1; i < N; i++) {
    if (A.at(i) < minimum) {
      minimum = A.at(i);
    } else if (i < N - 1) {
      if (A.at(i + 1) < A.at(i) && A.at(i) > minimum) {
        count = money / minimum;
        money -= count * minimum;
        money += count * A.at(i);
        count = 0;
        minimum = 1000;
      }
    }
    if (i == N - 1) {
      if (A.at(i) > minimum) {
        count = money / minimum;
        money -= count * minimum;
        money += count * A.at(i);
        count = 0;
      }
    }
  }
  cout << money << endl;
}
