#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n;
  cin >> n;
  ll arr[n];
  for (ll i = 0; i < n; i++) cin >> arr[i];
  ll money = 1000;
  ll stock = 0;
  ll flag = 0;
  for (ll i = 0; i < n; i++) {
    if (flag == 1 && i - 1 >= 0 && arr[i] > arr[i - 1]) {
      while (arr[i] > arr[i - 1] && i < n) {
        i++;
      }
      i--;
      money += stock * arr[i];
      stock = 0;
      flag = 0;
      continue;
    }
    if (flag == 0 && i + 1 < n && arr[i] < arr[i + 1]) {
      while (arr[i] < arr[i + 1] && i + 1 < n) {
        i++;
      }
      i--;
      stock = money / arr[i];
      money = money - stock * arr[i];
      flag = 1;
      continue;
    }
  }
  cout << money << endl;
  return 0;
}
