#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  ll stock = 0;
  ll money = 1000;
  for (int i = 0; i < N - 1; i++) {
    ll max_j = i;
    ll max_price = A[i];
    for (int j = i + 1; j < N; j++) {
      if (max_price > A[j]) {
        break;
      } else if (A[j] > max_price) {
        max_price = A[j];
        max_j = j;
      }
    }
    stock = money / A[i];
    money -= stock * A[i];
    money += stock * A[max_j];
    stock = 0;
    i = max_j + 1;
  }
  cout << money << endl;
  return 0;
}
