integer,allocatable::a(:),num(:) integer::i read *, N allocate(a(N),num(N)) read *,a num = 0 do i = 1, N num(a(i)) = num(a(i)) + 1 end do print '(i0)', COUNT(num.eq.1) end program