#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  int N, map<int, int> = 1000;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < N; i++) {
    if (A[i + 1] > A[i]) {
      for (int j = i + 1; j < N; j++) {
        if (A[j] > A[j + 1]) {
          int tmp = map<int, int> / A[i];
          map<int, int> -= A[i] * tmp;
          map<int, int> += A[j] * tmp;
          i = j + 1;
        }
      }
    }
  }
  cout << map<int, int> << endl;
  return 0;
}
