function v = Chandle(x)

global A0
global B0
global a0
global flag_shiftA
global lambdamin
global valb
global alphall 
global tt
global MVcount


if flag_shiftA == 2
  v = [tt*x(1) - a0'*x(2:end); A0*x(2:end) - lambdamin*(B0*x(2:end)) + (valb*(alphall.*(valb'*x(2:end)))) - x(1)*a0]; 
  MVcount = MVcount + 2;
else
  v = [tt*x(1) - a0'*x(2:end);A0*x(2:end) - x(1)*a0];
  MVcount = MVcount + 1;
end