PROGRAM ATCODER

implicit none
integer :: n,i,ans=0
integer,allocatable :: v(:), c(:)

read*, n
allocate(v(n),c(n))
read*, v(1:n), c(1:n)

do i = 1, n, 1
  if ( v(i)-c(i) > 0 ) then
    ans = ans + v(i) - c(i)
  end if
end do

print'(i0)', ans 

END PROGRAM ATCODER