I have a problem in the performance of my program

#define button 1

Assuming this is an Uno.
Then you shouldn't use pin1.
That pin is already used by the USB<>Serial chip.

Also avoid pin13 if you can. It could 'flash' during bootup.
Leo..