#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a;
int dp[100] = {};
int diff[100] = {};
int main() {
  dp[0] = 1000;
  int money = 1000;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    a.push_back(t);
  }
  for (int i = 1; i < n; i++) {
    int diff = a[i] - a[i - 1];
    if (diff > 0) {
      int s = money / a[i - 1];
      money %= a[i - 1];
      money += a[i] * s;
    }
  }
  cout << money << endl;
}
