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