#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const long long INF = 1000000000000000000;
int A[100];
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  int ans = 1000;
  int stock = 0;
  for (int i = 0; i < N; i++) {
    if (stock == 0) {
      if (A[i] < A[i + 1]) {
        stock += ans / A[i];
        ans -= stock * A[i];
      }
    } else {
      if (A[i] > A[i + 1]) {
        ans += stock * A[i];
        stock = 0;
      }
    }
  }
  cout << ans << endl;
}
