#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 1000000000 int main(){ long long a,b,x,N; cin>>a>>b>>x>>N; long long c1 = 0,c2 = 0; if(x%2==1){ //c1 += N/4; c2 += N/4; //if(N>=3)c2+=1; } else{ c1 += N/4; N %= 4; if(N>=3)c1 += 1; } cout<