#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100] = {0};
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long money = 1000;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      cnt = money / a[i];
      money %= a[i];
    } else {
      money += cnt * a[i];
    }
  }
  cout << money << endl;
}
