#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> kabu(N + 1);
  kabu.at(0) = 0;
  for (int i = 1; i <= N; i++) {
    cin >> kabu.at(i);
  }
  int now = 0;
  int money = 1000, get = 0;
  for (int i = 1; i < N; i++) {
    now = kabu.at(i);
    if (now < kabu.at(i + 1)) {
      get = money / now;
      money = money - get * now;
    } else {
      money += get * kabu.at(i);
      get = 0;
    }
  }
  if (get != 0) {
    money += get * kabu.at(N);
  }
  cout << money << endl;
}
