An old woman went to the market and a horse stepped on her basket and smashed her eggs. The rider offered to pay for the eggs and asked her how many there were. She did not remember the exact number, but when she had taken them two at a time there was one egg left, and the same happened when she took three, four, five, and six at a time. But when she took them seven at a time, they came out even. What is the smallest number of eggs she could have had?