#include <bits/stdc++.h>
using namespace std;
const long long N = 85, M = 1e4 + 5, INF = 1e9;
int main() {
  int n;
  cin >> n;
  int a[N];
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int ans = 1000;
  vector<pair<int, int> > sell;
  int p = 0;
  int f;
  for (int i = 1; i <= n; i++) {
    if (a[i] < a[i + 1]) {
      int plust = ans % a[i];
      ans = ((ans / a[i]) * a[i + 1]);
      ans += plust;
    }
  }
  cout << ans << endl;
}
