#include <bits/stdc++.h>
using namespace std;
long long int cal(vector<long long int> &A, long long int N,
                  long long int money, long long int flag) {
  int copy = flag;
  for (int i = flag; i < N - 1; i++) {
    if (i == N - 2) break;
    if (A.at(i) > A.at(i + 1)) break;
    flag++;
  }
  flag++;
  if (flag == N - 1 && A.at(flag - 1) > A.at(flag)) return money;
  if (flag == N - 1) flag++;
  money += (money / A.at(copy)) * (A.at(flag - 1) - A.at(copy));
  if (flag == N) flag--;
  if (flag == N - 1) {
    return money;
  } else {
    return cal(A, N, money, flag);
  }
}
int main(void) {
  long long int N;
  long long int money = 1000;
  cin >> N;
  vector<long long int> A(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  long long int flag = 0;
  money = cal(A, N, money, flag);
  cout << money;
}
