      PROGRAM november30
      IMPLICIT NONE
      integer :: a(2),b(2)
      
      read*,a
      read*,b
      
      if( a(1)/=b(1) )then
        print'(i0)',1
      else
        print'(i0)',0
      end if
      
      
      
      
      
      
      END PROGRAM