#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int money = 1000;
  int kab = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] >= a[i + 1]) {
      money += kab * a[i];
      kab = 0;
      continue;
    }
    int x = money / a[i];
    kab += x;
    money -= x * a[i];
  }
  money += kab * a[n - 1];
  cout << money << endl;
}
