#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1001001001;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];
  int num = 0, money = 1000;
  for (int i = 0; i < N; ++i) {
    if (A[i] < A[i + 1]) {
      num = money / A[i];
      money -= A[i] * num;
      money += A[i + 1] * num;
      num = 0;
    }
  }
  cout << money << endl;
}
