a=gets.split.map &:to_i while a.sort![2]-a[0]>1 n=[(a[2]-a[1])/2,1].max a[2]-=2*n a[0]+=n end p a.min