program main
  implicit none
  integer :: n, i, res
  integer, allocatable :: v(:), c(:)
  read (*, *) n
  allocate (v(n), c(n))
  read (*, *) (v(i), i = 1, n)
  read (*, *) (c(i), i = 1, n)
  res = 0
  do i = 1, n
    res = res + max(0, v(i) - c(i))
  end do
  write (*, "(i0)") res
end program main
