#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> ud;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      ud.push_back(1);
    } else if (a[i] == a[i + 1]) {
      ud.push_back(0);
    } else {
      ud.push_back(-1);
    }
  }
  vector<vector<int>> v(100);
  int turn = 0;
  for (int i = 0; i < n - 1; i++) {
    if (ud[i] == 1) {
      v[turn].push_back(i);
    } else {
      turn++;
    }
  }
  long long start = 1000;
  for (int i = 0; i < 100; i++) {
    if (v[i].size() > 0) {
      for (int j = 0; j < v[i].size(); j += 2) {
        int x = v[i][j];
        int rest = start % a[x];
        start /= a[x];
        start = start * a[x + 1] + rest;
      }
    }
  }
  cout << start << "\n";
  return 0;
}
