#include <bits/stdc++.h>
using namespace std;
char _;
int n;
int nums[81];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  int money = 1000;
  int stocks = 0;
  for (int i = 0; i < n; i++) cin >> nums[i];
  nums[n] = -1e9;
  for (int i = 0; i < n; i++) {
    if (nums[i] < nums[i + 1]) {
      stocks += money / nums[i];
      money %= nums[i];
    } else if (nums[i] > nums[i + 1]) {
      money += stocks * nums[i];
      stocks = 0;
    }
  }
  cout << money << "\n";
  return 0;
}
