#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  long long A[N];
  for (int i = 0; i < N; i++) cin >> A[i];
  long long money = 1000;
  long long stock = 0;
  for (int i = 0; i < N - 1; i++) {
    if (A[i] < A[i + 1]) {
      int tmp = money / A[i];
      stock += tmp;
      money -= tmp * A[i];
    } else if (A[i] > A[i + 1]) {
      money += stock * A[i];
      stock = 0;
    }
  }
  money += stock * A[N - 1];
  cout << money << endl;
  return 0;
}
