implicit none
integer n,i,j,k
integer :: sum=0
integer,allocatable,dimension(:)::v,c

read(5,*)n
allocate(v(n),c(n))
read(5,*) (v(i),i=1,n)
read(5,*) (c(j),j=1,n)

do k=1,n
if((v(k)-c(k)).gt.0) then
sum=sum+v(k)-c(k)
endif
enddo

write(6,*)sum


deallocate(v,c)
end