LED Programme where it delays the amount written in the Serial Monitor
Here you have.

No error checking. Anything not digit produce zero as output.

void setup()
{
    Serial.begin(9600);
    Serial.println("Programming is starting");
    pinMode(13,OUTPUT);
}

void loop()
{
    static int value = 0;

    while(Serial.available() &gt; 0) {
        int c = Serial.read();

        if(isDigit(c)) {
            value = value * 10 + (c - '0');
        } else {
            Serial.println(value);
            digitalWrite(13,HIGH);
            delay(value*1000);
            digitalWrite(13,LOW);
            value = 0;
        }
    }


It convert chars to values as they are being readed, one by one. There are no size limit for the input string, other that final value must fit in an int

You write a value in the Serial Monitor and end it with return, space bar or whatever non digit key you want.