A cowboy was asked how many cows were on the ranch. He replied that he was unsure, but he knew that when he ocunted them by twos, threes, fours, fives, or sixes, he always had one left over. The only way he could acoid this was to count by sevens; he then had none left over. What is the smallest number of cows on the ranch?

Please help me answer this! Thank you!