How to read integers

How would you do this using

while (!Serial.available()) {

;
}