Alice, 9 bytes
2/S 3 o@i Alice has a built-in to replace a divisor of a number with another. I didn't think I'd actually get to make use of it so soon...
Using the code points of characters for I/O, this becomes 6 bytes: I23SO@.
Explanation
2 Push 2 (irrelevant). / Reflect to SE. Switch to Ordinal. i Read all input as a string. The IP bounces up and down, hits the bottom right corner and turns around, bounces down again. i Try to read more input, but we're at EOF so this pushes an empty string. / Reflect to W. Switch to Cardinal. 2 Push 2. The IP wraps around to the last column. 3 Push 3. S Implicitly discard the empty string and convert the input string to the integer value it contains. Then replace the divisor 2 with the divisor 3 in the input. This works by multiplying the value by 3/2 as long as it's divisible by 2. / Reflect to NW. Switch to Ordinal. Immediately bounce off the top boundary. Move SW. o Implicitly convert the result to a string and print it. Bounce off the bottom left corner. Move NE. / Reflect to S. Switch to Cardinal. @ Terminate the program.