#include <bits/stdc++.h>
using namespace std;
int a[100];
vector<int> v;
int main() {
  int n, m, k, i;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int tm = 200, f;
  for (int i = 1; i <= n; i++) {
    f = 0;
    while (a[i] < tm && i <= n) {
      tm = a[i];
      i++;
      f = 1;
    }
    if (f == 1) v.push_back(tm);
    f = 0;
    while (a[i] > tm && i <= n) {
      tm = a[i];
      i++;
      f = 1;
    }
    if (f == 1) v.push_back(tm);
  }
  int ans = 0, pp = 1000;
  for (int i = 0; i < v.size(); i++) {
    if (i % 2) {
      int p = pp / v[i - 1];
      ans += pp % v[i - 1];
      pp = v[i] * p;
    }
  }
  ans += pp;
  cout << ans << endl;
}
