Well i was hoping for solution...but i solved it by myself..so here it is.
if (Serial.available() > 2) // for 3 digit number...if 4 didgit number then serial.avaialable()>3
{
// read the incoming byte:
incomingByte=0;
x=0;
incomingByte = Serial.read();
x= (incomingByte-48)*100; // to convert ascii value to integer digit
if (x>=899) // two digit number 24 is send as 900 + 24 =924
x=x-900;
// Serial.println(incomingByte);
incomingByte = Serial.read();
x=x+((incomingByte-48)*10); // string to int conversion
// Serial.println(incomingByte);
incomingByte = Serial.read();
//Serial.println(incomingByte);
x=x+incomingByte-48;
s1=x;
Serial.println(s1);
//myservo1.write(s1);
}