Simple serial monitor input reads almost correctly

I am trying to read a number inputed to the Serial Monitor and store it in a variable. It works the first time through the loop but somehow another number is being inputed. In the code I get a return of:

i = 2341 (the number I typed in. Good!)
Then i = 0 (don't know where this came from.)
I want to save the number inputed in the serial monitor, not the odd 0.

Does hitting ENTER or clicking the SEND button cause another character to be sent?

int i;
void setup() {  
 Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
 Serial.setTimeout(20);
}
void loop() {
  while (Serial.available()==0) {}
    i = Serial.parseInt();
    Serial.print("i= ");
    Serial.println(i);
}

Does hitting ENTER or clicking the SEND button cause another character to be sent?

Only of you tell it to
What have you got Line ending set to in the Serial monitor ?

Line ending in serial monitor.

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

And there is this clever idea if you just want to check for single characters.

...R

UKHeliBob:
Only of you tell it to
What have you got Line ending set to in the Serial monitor ?

Problem solved! I set the Serial Monitor to "No Line Ending" instead of "Newline" and the pesky second output went away. Thank you.