Running IF only once
After you have seen it low, you have to wait for it to go high again:

if(a==LOW)
{
  delay(1000);
  digitalWrite(0, HIGH);
  delay(1000);
  digitalWrite(0, LOW);
  while (digitalRead(1)==LOW)
    delay(10); // or more or less then 10 
}