#include #include #include int main() { int n; std::vector d; int x, y; int cd; int ans; std::cin >> n; for(int i = 0; i < n; i++) { int tmp; std::cin >> tmp; d.push_back(tmp); } std::cin >> x >> y; int dmax = *std::max_element(d.begin(), d.end()); cd = std::max(std::abs(x), std::abs(y)); if (cd == 0) { ans = 0; } else if (std::find(d.begin(), d.end(), cd) != d.end()) { ans = 1; } else if (cd <= dmax * 2) { ans = 2; } else { ans = cd / (2 * dmax) * 2; cd = cd % (2 * dmax); if (cd > 0) { ans++; } if (cd > dmax) { ans++; } } std::cout << ans << std::endl; }