Liza is a math teacher. She wrote three consecutive even numbers on the board. She then multiplied the first by 2, the second by 3 and the third by four. Finally she added all the numbers and got the sum as 394. What was the smallest number she wrote ?