#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inf = 4e18;
const long long N = 5e5 + 5;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tt = 1;
  while (tt--) {
    long long n;
    cin >> n;
    long long arr[n];
    for (long long i = 0; i < n; ++i) {
      cin >> arr[i];
    }
    long long money = 1000, minn = inf;
    for (long long i = 0; i < n; ++i) {
      if (arr[i] > minn) {
        long long x = money / minn;
        long long y = money % minn;
        money = y + x * arr[i];
        minn = inf;
      } else {
        minn = min(minn, arr[i]);
      }
    }
    cout << money << "\n";
  }
  return 0;
}
