#include <bits/stdc++.h>
#pragma GCC optimize("O2")
#pragma GCC target("avx2")
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  int A[80];
  for (int i = 0; i < (N); i++) cin >> A[i];
  long long kotae = 1000;
  int mae = A[0];
  for (int i = 0; i < (N); i++) {
    if (mae >= A[i]) {
      mae = A[i];
    } else {
      while (i < N && A[i - 1] <= A[i]) {
        i++;
      }
      kotae = kotae % mae + kotae / mae * A[i - 1];
      mae = 2e9;
    }
  }
  cout << (kotae) << "\n";
  return 0;
}
