#include <bits/stdc++.h>
using namespace std;
using LLONG = long long;
const LLONG MOD = 1000000007;
int main() {
  int N;
  cin >> N;
  vector<LLONG> as(N);
  for (int i = 0; i < N; ++i) cin >> as[i];
  LLONG money = 1000;
  for (int i = 0; i < N;) {
    LLONG high = as[i];
    int next = i + 1;
    for (int j = i + 1; j < N; ++j) {
      if (as[i] > as[j]) {
        next = j;
        break;
      }
      if (as[i] < as[j]) {
        if (high <= as[j]) {
          high = as[j];
          next = j + 1;
        } else {
          next = j;
          break;
        }
      }
    }
    if (high > as[i]) {
      LLONG stock = money / as[i];
      money %= as[i];
      money += high * stock;
    }
    i = next;
  }
  cout << money << endl;
}
