#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> price;
  int cur = a[0], bigorsmall = -1;
  for (int i = 1; i < n; i++) {
    if (a[i] >= cur) {
      if (bigorsmall == -1) {
        price.push_back(cur);
        bigorsmall = 1;
        cur = a[i];
      } else if (bigorsmall == 1)
        cur = a[i];
      else {
        price.push_back(cur);
        cur = a[i];
        bigorsmall = 1;
      }
    } else {
      if (bigorsmall == -1) {
        cur = a[i];
        bigorsmall == 0;
      } else if (bigorsmall == 0)
        cur = a[i];
      else {
        price.push_back(cur);
        cur = a[i];
        bigorsmall = 0;
      }
    }
  }
  if ((int)price.size() > 0 && cur > price.back()) price.push_back(cur);
  int m = 1000;
  for (int i = 0; i < (int)price.size() && i + 1 < (int)price.size(); i += 2) {
    int x = m / price[i];
    m -= x * price[i];
    m += x * price[i + 1];
  }
  cout << m << '\n';
  return 0;
}
