#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int factorization(int n) {
  int fac_ans = 1.0;
  for (int i = 1; i <= n; i++) fac_ans *= i;
  return fac_ans;
}
const long long MOD = 1000000007;
const long long INF = 100000000;
int main() {
  int n;
  cin >> n;
  vector<int> a(85);
  for (int i = 0; i < n; i++) cin >> a[i];
  int money = 1000, k_cnt = 0, left = 0, k_mone = a[0];
  for (int i = 0; i < n; i++) {
    if (k_mone < a[i + 1]) {
      left = money % a[i];
      k_cnt = (money - left) / a[i];
      money = left;
      k_mone = a[i + 1];
    } else if (k_mone > a[i + 1] & k_cnt != 0) {
      money = left + k_cnt * a[i];
      k_cnt = 0;
      k_mone = a[i + 1];
    }
  }
  cout << money << endl;
  return 0;
}
