#include <bits/stdc++.h>
using namespace std;
const int MAX = 80;
int main() {
  int N;
  int A[MAX];
  int DP[MAX];
  long long x = 1000;
  long long y = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 1; i < N; i++) {
    if (A[i - 1] < A[i]) {
      y = x / A[i - 1];
      x = x % A[i - 1];
    }
    if (A[i - 1] > A[i]) {
      x += y * A[i - 1];
      y = 0;
    }
  }
  x += y * A[N - 1];
  cout << x << endl;
  return 0;
}
