#include <bits/stdc++.h>
using namespace std;
const long long int maxr = 85;
long long int arr[maxr];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  cin >> n;
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  long long int yan = 1000;
  long long int stock = 0;
  for (long long int i = 1; i < n; i++) {
    if (arr[i - 1] < arr[i]) {
      long long int times = 0;
      while (arr[i - 1] * times <= yan) times++;
      times--;
      yan -= arr[i - 1] * times;
      stock += times;
      while (stock > 0) yan += arr[i], stock--;
    }
  }
  cout << yan << endl;
  return 0;
}
