program round_one

 implicit none
 integer :: a,b,ans
 
 read*,a,b

 if((a==1 .and. b==2) .or. (a==2 .and. b==1)) ans=3
 if((a==2 .and. b==3) .or. (a==3 .and. b==2)) ans=1
 if((a==1 .and. b==3) .or. (a==3 .and. b==1)) ans=2

 print*,ans

end program round_one