#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  int now = A[0];
  int have = 0;
  int money = 1000;
  int state = 0;
  for (int i = 0; i < N + 1; i++) {
    if (state == 0) {
      if (i == N) break;
      if (now >= A[i]) {
        now = A[i];
      } else {
        have = money / now;
        money -= have * now;
        state = 1;
      }
    } else {
      if (i == N) {
        money += have * A[N - 1];
        break;
      }
      if (now <= A[i]) {
        now = A[i];
      } else {
        money += have * now;
        have = 0;
        state = 0;
      }
    }
  }
  cout << money << endl;
  return 0;
}
