#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9;
int n;
long long arr[81];
long long solve(long long taka) {
  long long stock;
  for (int i = 1; i < n; i++) {
    if (arr[i] < arr[i + 1]) {
      stock = taka / arr[i];
      taka -= (arr[i] * stock);
      i++;
      taka += (arr[i] * stock);
    }
  }
  return taka;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int a, b, c, i, j, k, t, m;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> arr[i];
  cout << solve(1000) << endl;
  return 0;
}
