#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
template <typename T>
auto compare = [](T x, T y) -> bool { return (x < y); };
const long long MOD = 1000000007;
int N;
int A[100];
signed main() {
  cin >> N;
  for (int(i) = 0; (i) < (N); ++(i)) cin >> A[i];
  int m = 1000;
  for (int(i) = (1); (i) < (N); ++(i)) {
    while (i < N && A[i - 1] >= A[i]) i++;
    if (i == N) break;
    int d = A[i] * (m / A[i - 1]);
    m %= A[i - 1];
    m += d;
  }
  cout << (m) << "\n";
  return 0;
}
