#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
long long GCD(long long x, long long y) {
  if (y == 0)
    return x;
  else
    return GCD(y, x % y);
}
long long LCM(long long a, long long b) { return a / GCD(a, b) * b; }
const int MOD = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  int ans = 1000;
  int k = 0;
  v.erase(unique(v.begin(), v.end()), v.end());
  for (int i = 1; i < v.size(); i++) {
    if (v[i] > v[i - 1]) {
      k = 0;
      k = ans / v[i - 1];
      ans -= k * v[i - 1];
      ans += k * v[i];
    }
  }
  cout << ans;
}
