#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++) {
    int tmp = 0;
    if (A[i] < A[i + 1]) {
      tmp = map<int, int> / A[i];
    }
    map<int, int> += (A[i + 1] - A[i]) * tmp;
  }
  cout << map<int, int> << endl;
  return 0;
}
