Update Egg Problem

The question was:
An old woman goes to market and a horse steps on her basket and crushes the 
eggs. The rider offers to pay for the damages and asks her how many eggs she had 
brought. She does not remember the exact number, but when she had taken them 
out two at a time, there was one egg left. The same happened when she picked 
them out three, four, five, and six at a time, but when she took them seven at a time 
they came out even. Write a program that figures out the smallest number of eggs 
she could have had.