#include #include #include using namespace std; using namespace __gnu_pbds; #define fi first #define se second #define mp make_pair #define pb push_back #define fbo find_by_order #define ook order_of_key typedef long long ll; typedef pair ii; typedef vector vi; typedef long double ld; typedef tree, rb_tree_tag, tree_order_statistics_node_update> pbds; typedef set::iterator sit; typedef map::iterator mit; ll mx[2]; ll a[111111]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin>>n; mx[0]=-ll(1e9); mx[1]=-ll(1e9); for(int i=0;i>a[i]; mx[a[i]&1]=max(mx[a[i]&1],a[i]); } ll x,y; cin>>x>>y; ll D = abs(x)+abs(y); if(D==0){cout<<0<<'\n'; return 0;} for(int i=0;i