#include <bits/stdc++.h>
using namespace std;
void solve(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (long long)n; ++i) cin >> a[i];
  long long stock = 0;
  int money = 1000;
  for (int i = 0; i < (long long)n; ++i) {
    stock = 0;
    if (a[i] < a[i + 1]) stock = money / a[i];
    money += (a[i + 1] - a[i]) * stock;
  }
  cout << money << endl;
}
int main(void) { solve(); }
