You need 6 extra bits.
The Hamming codes are perfect, but they don't exist for any number of data bits.
Two of them are Hamming(31, 26) and Hamming(63, 57).
The first number is the total number of bits, and the second is the number of data bits.
You can take Hamming(63, 57) and use only 32 of the 57 data bits.
You will have 32 data bits + 6 parity bits = 38 bits.
When doing the calculations, you can pad the 32 data bits to 57 bits by using any fixed pattern known by both the transmitter and the receiver, all zeros is OK.