#include <avr/io.h>
#ifndef _BV
#define _BV(x) (1 << x)
#endif
#define F_CPU 16000000
int main(void){
DDRD &= ~_BV(5);
PORTD |= _BV(5);
DDRD |= _BV(6);
while(1){
if(!(PIND & _BV(5))){
PORTD |= _BV(6);
} else {
PORTD &= ~_BV(6);
}
}
return 0;
}