program rss
  implicit none
  integer :: N,i,val
  integer,allocatable :: V(:),C(:)

  read(*,*) N
  allocate(V(N))
  allocate(C(N))

  read(*,*) V
  read(*,*) C
  val=0
  do i=1,N
     if(V(i).gt.C(i)) then
        val=val+(V(i)-C(i))
     endif
  enddo
  write(*,'(i0)') val
  deallocate(V)
  deallocate(C)



end program rss

