#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long MOD2 = 998244353;
const long long MOD3 = 1812447359;
const long long INF = 1ll << 62;
const double PI = 2 * asin(1);
void yes() { printf("yes\n"); }
void no() { printf("no\n"); }
void Yes() { printf("Yes\n"); }
void No() { printf("No\n"); }
void YES() { printf("YES\n"); }
void NO() { printf("NO\n"); }
int N, A[85];
vector<int> V;
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  int now = A[0];
  for (int i = 0; i < N; i++) {
    if (V.size() % 2 == 0) {
      if (now >= A[i])
        now = A[i];
      else
        V.push_back(now), now = A[i];
    } else {
      if (now <= A[i])
        now = A[i];
      else
        V.push_back(now), now = A[i];
    }
  }
  V.push_back(now);
  if (V.size() == 1) {
    cout << 1000 << endl;
    return 0;
  }
  int res = 1000, kabu = 0;
  for (int i = 0; i < V.size(); i += 2) {
    kabu = res / V[i];
    res %= V[i];
    res += kabu * V[i + 1];
    kabu = 0;
  }
  cout << res << endl;
  return 0;
}
