a=0 (~/ /;a-=-$`.to_i/2*$'.to_i)while gets p a%=10**9+7