#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const long long mod = 1e9 + 7;
long long n;
long long arr[500];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  long long ans = 0;
  int prev = arr[1];
  int s = 1000 / arr[1];
  int mon = 1000 % arr[1];
  for (int i = 2; i <= n; i++) {
    if (arr[i] < prev) {
      mon += s * prev;
      prev = arr[i];
      s = mon / arr[i];
      mon = (mon % arr[i]);
    } else if (arr[i] > prev) {
      mon += s * arr[i];
      s = mon / arr[i];
      prev = arr[i];
      mon = mon % arr[i];
    }
  }
  cout << max(1000, s * prev + mon) << "\n";
}
