program sample
    implicit none
  
    integer(8) :: i,j,m,n,x,y
    real(8)::a,b
    
  
    read(*,*) x,y
    m=0
    if (x==1)then
        m=m+300000
        if (y==1)then
            m=m+400000
        end if
    end if
    if (x==2)then
        m=m+200000
    end if
    if (x==3)then
        m=m+100000
    end if
    if (y==1)then
        m=m+300000
    end if
    if (y==2)then
        m=m+200000
    end if
    if (y==3)then
        m=m+100000
    end if
    write(*,*) m
  
    stop
end program sample
  

