a=gets.split.map(&:to_i).sort;a=[a[0]+1,a[1],a[2]-2].sort while a[2]-a[0]>2;p a[0]