program main implicit none integer::N,i,j integer,allocatable::A(:) integer::B(0:2**15-1) read *,N allocate(A(N)) read *,A B = 0 B(A) = 1 do i=1,N do j=1,2**15-1 if(B(j).eq.1) B(IEOR(A(i),j))=1 end do end do print '(i0)', COUNT(B.eq.1) end program main