function y=hanshu(n)
syms q d u m;
if mod(n,2)==0
y=(5*q*d-10*u*d)*n+m*d*(q-u)/3;
else
y=5*(n+1)*q*d-10*n*q*d-m*d*u/3;
end