#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(n, 0);
  for (int i = 0; i < n; i++) cin >> a[i];
  int money = 1000, k_cnt = 0, left = 1000, k_mone = a[0];
  int up_flag = 1;
  if (a[0] < a[1]) up_flag = 0;
  if (a[0] >= a[1]) up_flag = 1;
  for (int i = 0; i < n; i++) {
    if (k_mone < a[i + 1] && up_flag == 0) {
      left = money % a[i];
      k_cnt = (money - left) / a[i];
      money = left;
      k_mone = a[i + 1];
      up_flag = 1;
    } else if (k_mone < a[i + 1]) {
      up_flag = 1;
    } else if (k_mone >= a[i + 1] && up_flag == 1) {
      money = left + k_cnt * a[i];
      left = money;
      k_cnt = 0;
      k_mone = a[i + 1];
      up_flag = 0;
    } else if (k_mone >= a[i + 1]) {
      up_flag = 0;
    }
  }
  cout << money + k_cnt * a[n - 1] << endl;
  return 0;
}
