#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long int sum = 0;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long int ans = 1;
  int money = 1000;
  int fund = 0;
  int buy = -1, sell = -1;
  for (int i = 0; i < n; i++) {
    if (i == n - 1) {
      if (buy != -1) {
        fund = money / a[buy];
        money = money % a[buy];
        money += fund * a[sell];
        buy = -1;
        sell = -1;
      }
    } else if (a[i] < a[i + 1]) {
      if (buy == -1) {
        buy = i;
      }
      sell = i + 1;
    } else if (buy != -1) {
      fund = money / a[buy];
      money = money % a[buy];
      money += fund * a[sell];
      buy = -1;
      sell = -1;
    }
  }
  cout << money;
  return 0;
}
