program name
    implicit none
    integer(4):: n
    integer(4),allocatable:: c(:),v(:),profit(:)

    read*, n
    allocate(c(n), v(n),profit(n))
    read*, v(:)
    read*, c(:)
    print*, sum(v-c, mask=v-c>0)
end program name