<>=~$";$\+=$h{$_+0^$'},++$h{$_+0}for<>;print