State machinese for serial input
I don't understand why you use 2 Serial.available condition.
I try to rewrote your program based on my imagination, so do not hate me if its wrong.
Why don't you try this and tell the results:    

int pos = 0,x=0;
void loop() 
{
  while (Serial.available() &gt; 0) x = Serial.parseInt();

  pos+=x;
  if (pos&gt;180) pos = 0;
  myservo.write(pos);
  Serial.println (pos);
  delay(100);
}