#include int n; long long a[32]; int mem[1048576]; int rep(int fl,int tr,long long lef){ if(lef<0){return tr;} if(fl==0){return 0;} if(lef==0){return -tr;} if(mem[fl]!=-100){return mem[fl];} int mo=0,z=0,po=0; for(int i=0;i