#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int wallet = 1000;
  int lastPrice;
  cin >> lastPrice;
  N--;
  int n;
  int curPrice;
  while (N--) {
    cin >> curPrice;
    if (curPrice >= lastPrice) {
      n = wallet / lastPrice;
      wallet += n * (curPrice - lastPrice);
    }
    lastPrice = curPrice;
  }
  cout << wallet;
  return 0;
}
