Enter a number value such as 3 (with "No line ending" selected in the serial monitor) to see the sketch delay before getting the 3 value, but then use the value correctly. Enter a value such as "3x" (with or without a line ending) to see the sketch pick up the 3 value instantly but then after a delay receive a 0 value.
You call parseInt() and it sees the 3, starts to accumulate digits and knows it is done when it sees a non-digit (x) coming. It returns the 3.
You call parseInt() again and it sees the 'x'. Probably throws it away and waits for a digit to arrive. After a second it has no new input so it returns 0.
After each parseInt() you should check the serial buffer (.available()) and read the terminating character. You can turn on linefeed (newline) terminators and check that the terminating character is '\n'. If it isn't you have detected an input error and can ignore the number.