#include <bits/stdc++.h>
using namespace std;
using UL = unsigned int;
using ULL = unsigned long long;
using LL = long long;
int main() {
  int N;
  scanf("%d", &N);
  vector<int> A = vector<int>(N, 1);
  for (int i = 0; i < (N); i++) scanf("%d ", &A[i]);
  int min, max, mod, stock;
  int money = 1000;
  for (int i = 0; i < (N); i++) {
    if (i == 0) min = A[0];
    if (A[i + 1] - A[i] < 0) {
      max = A[i];
      mod = money % min;
      stock = (money / min);
      money = max * stock + mod;
      min = INT_MAX;
    }
    if (A[i] < min) min = A[i];
  }
  if (A[N - 1] > min) {
    max = A[N - 1];
    mod = money % min;
    stock = (money / min);
    money = max * stock + mod;
  }
  cout << money << endl;
  return 0;
}
