#include <bits/stdc++.h>
using namespace std;
int const INF = (int)1e9 + 1e3;
long long const INFL = (long long)1e18 + 1e6;
const int N = 1e5 + 5;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < int(n); i++) cin >> a[i];
  int j = 0;
  int money = 1000;
  int stocks = 0;
  while (j < n) {
    while (j < n - 1 && a[j + 1] <= a[j]) {
      j++;
    }
    if (j == n - 1) {
      break;
    }
    stocks += money / a[j];
    money = money % a[j];
    j++;
    if (j >= n) {
      break;
    }
    while (j < n - 1 && a[j + 1] >= a[j]) {
      j++;
    }
    money += stocks * a[j];
    stocks = 0;
    j++;
  }
  cout << money << "\n";
}
