#include <bits/stdc++.h>
using namespace std;
int findNextBottom(vector<int> prices, int start) {
  int bottom = -1;
  if (start == 0) {
    bottom = 0;
  }
  for (int i = start + 1; i < prices.size(); i++) {
    if (bottom < 0) {
      if (prices[start] > prices[i]) {
        bottom = i;
        continue;
      } else if (prices[start] == prices[i]) {
        continue;
      } else {
        return -1;
      }
    } else {
      if (prices[bottom] > prices[i]) {
        bottom = i;
        continue;
      } else if (prices[bottom] == prices[i]) {
        continue;
      } else {
        return bottom;
      }
    }
  }
  return bottom;
}
int findNextPeak(vector<int> prices, int start) {
  int peak = -1;
  for (int i = start + 1; i < prices.size(); i++) {
    if (peak < 0) {
      if (prices[start] < prices[i]) {
        peak = i;
        continue;
      } else if (prices[start] == prices[i]) {
        continue;
      } else {
        return -1;
      }
    } else {
      if (prices[peak] < prices[i]) {
        peak = i;
        continue;
      } else if (prices[peak] == prices[i]) {
        continue;
      } else {
        return peak;
      }
    }
  }
  return peak;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int money = 1000;
  int stock = 0;
  int date = 0;
  while (date < n) {
    int nextBottom = findNextBottom(a, date);
    if (nextBottom < 0) {
      break;
    }
    int nextPeak = findNextPeak(a, nextBottom);
    if (nextPeak < 0) {
      break;
    }
    int buy = money / a[nextBottom];
    money = money - buy * a[nextBottom];
    stock = stock + buy;
    money = money + stock * a[nextPeak];
    stock = 0;
    date = nextPeak;
  }
  cout << money << endl;
  return 0;
}
