($$_)=@$_=sort{$b-$a}<>=~/\d+/g for a..c;print$=+(($==($c-1)/$b+1)==!($c~~@b))