$%=<>; ++$h{$x+=$_}for 1..5e3; print$h{$%}?1:grep($h{$%-$_},keys%h)?2:3