#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int a[100];
  int M = 1000;
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < N - 1; i++) {
    if (a[i] < a[i + 1] && stock == 0) {
      stock = M / a[i];
      M -= a[i] * stock;
    } else if (a[i] > a[i + 1] && stock > 0) {
      M += a[i] * stock;
      money = M;
      stock = 0;
    }
  }
  if (M > money) {
    cout << M << endl;
  } else {
    cout << money << endl;
  }
}
