#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long INF = 1LL << 60;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int money = 1000;
  int kabu = 0;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > a[i - 1]) {
      int store = money / a[i - 1];
      money += (a[i] - a[i - 1]) * store;
    }
  }
  cout << money << endl;
}
