#include <bits/stdc++.h>
using namespace std;
int const INF = 1001001001;
long long const LINF = 1001001001001001001;
long long const MOD = 1000000007;
int N;
int A[81];
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  A[N] = 0;
  int inf = INF, sup = 0;
  for (int i = 0; i < N; i++) inf = min(inf, A[i]);
  for (int i = 0; i < N; i++) sup = max(sup, A[i]);
  int ans = 1000;
  int l = 0;
  for (int i = 0; i < N; i++) {
    if (A[i] > A[i + 1]) {
      int cnt = ans / A[l];
      ans = ans % A[l] + cnt * A[i];
      l = i + 1;
    }
  }
  cout << ans << endl;
}
