#include <bits/stdc++.h>
using namespace std;
long long N, A[87], money = 1000;
int main() {
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> A[i];
  for (int i = 1; i <= N - 1; i++) {
    long long stokes = 0;
    if (A[i] + A[i + 1] < money) stokes = money / A[i];
    money += (A[i + 1] - A[i]) * stokes;
  }
  cout << money << endl;
  return 0;
}
