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