The cows in farmer John's herd are numbered and branded with consecutive integers from 1 to N (1