Hello di55,
Welcome to the Arduino fora.
Before you do anything else please take a moment to read General guidance and How to use this forum
Especially item #7 on posting code.
Pins 0 and 1 are used for the serial monitor on most (all?) Arduinos, so you should not use them as general inputs and outputs.
As has been pointed out, the real problem is the use of pin 1 as an input and although it would not make any difference it would make more sense logically to read the state of the input pin at the start of loop() immediately before testing its value