program probC
  implicit none
  integer i,j,a,b,c,tmp,min,max,mid,ans,N,t
  integer abc(3),par(3)

  read(*,*) a,b,c

  abc(1) = a
  abc(2) = b
  abc(3) = c

  N = 3
  do i=1,N-1
     do j=i+1,N
        if(abc(i) .gt. abc(j))then
           t=abc(i)
           abc(i)=abc(j)
           abc(j)=t
        end if
     end do
  end do  

  ans = 0
  do i=1,3
     par(i) = mod(abc(i),2)
  end do

  if(sum(par)==1)then
     ans = ans+1
     do i =1,3
        if ( par(i)==0 ) then
           abc(i)=abc(i)+1
        end if
     end do
  else if(sum(par)==2)then
     ans = ans+1     
     do i =1,3
        if ( par(i)==1) then
           abc(i)=abc(i)+1
        end if
     end do
  end if

  write (*,*)ans+ (2*abc(3)-abc(2)-abc(1))/2




     
    
end program probC
