program main
implicit none
integer :: i, j, k
integer :: a(3)

read(*,*) a
k = 0
do i = 1, 2
   do j = i+1, 3
      if( a(i) /= a(j) ) then
         k = k + 1
      end if
   end do
end do
write(*,'(i0)') k


end program main
