#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> trade;
  bool ud = true;
  int temp = 1000;
  for (ll i = 0; i < (n); i++) {
    int a;
    cin >> a;
    if (ud) {
      if (a <= temp)
        temp = a;
      else {
        ud = false;
        trade.push_back(temp);
        temp = a;
      }
    } else {
      if (a >= temp)
        temp = a;
      else {
        ud = true;
        trade.push_back(temp);
        temp = a;
      }
    }
  }
  if (trade.back() < temp) trade.push_back(temp);
  int money = 1000;
  int m = trade.size() / 2;
  for (ll i = 0; i < (m); i++) {
    money += (money / trade[i * 2]) * (trade[i * 2 + 1] - trade[i * 2]);
  }
  cout << money << endl;
  return 0;
}
