read a b echo $[(b-a-(a+b*2)%3+3)/3]