For some positive integer \( n \), Katya wrote the numbers from \( 1 \) to \( 2^n \) in a row in increasing order. Oleksii rearranged Katya's numbers and wrote the new sequence directly below the first row. Then, they calculated the sum of the two numbers in each column. Katya calculated \( N \), the number of powers of two among the results, while Oleksii calculated \( K \), the number of distinct powers of two among the results. What is the maximum possible value of \( N + K \)? Proposed by Oleksii Masalitin