
int k=1000;

void setup() {
  // put your setup code here, to run once:
pinMode(13,OUTPUT);
pinMode(22,INPUT);
pinMode(23,INPUT);
}

void loop() 
{
if (digitalRead(22)==HIGH or digitalRead(23)==HIGH and k>=50)
{
   digitalWrite(13,HIGH);
  delay(k);
  
    digitalWrite(13,LOW);
  delay(k);
  k=(k-5);
  }
 else {
 (digitalWrite(13,HIGH));
 delay(k*5); 
  digitalWrite(13,LOW);
  delay(k/2);
 }
}
