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