#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = 0; i < long long(n); i++) cin >> a[i];
  int ans = 1000;
  int mini = 300, maxi = 0;
  for (long long i = 0; i < long long(n); i++) {
    mini = min(mini, a[i]);
    maxi = max(maxi, a[i]);
    if (i + 1 >= n || a[i] >= a[i + 1]) {
      if (mini == maxi) {
        mini = 300;
        maxi = 0;
        continue;
      }
      int num = ans / mini;
      ans %= mini;
      ans += maxi * num;
      mini = 300;
      maxi = 0;
    }
  }
  cout << ans << endl;
}
