#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
int main() {
  int n;
  cin >> n;
  int an[n];
  for (int i = 0; i < (int)(n); i++) cin >> an[i];
  int coin = 1000;
  int stock = 0;
  int i = 0;
  while (i < n - 1) {
    if (stock == 0) {
      if (an[i] < an[i + 1]) {
        stock = coin / an[i];
        coin -= stock * an[i];
      }
    } else {
      if (an[i] > an[i + 1]) {
        coin += stock * an[i];
        stock = 0;
      }
    }
    i++;
  }
  coin += stock * an[n - 1];
  cout << coin;
}
