Envelope #3: The Undefeated Rooster

You tear open the third envelope. Inside you find a note, which reads:
This riddle is a challenge - you must defeat my prized fighting rooster! Of course, this will be a battle of intelligence, not strength. The rules of battle are simple - You and my rooster will each take turns picking up kernels of corn. On your turn you must take a positive number of kernels from a single pile. The one who takes the last kernel wins! I advise you to think through each move thoroughly - my rooster has never yet tasted defeat!

As soon as you finish reading the note, a majestic rooster struts over and drops a small linen bag at your feet. The bag, seemingly with a mind of its own, tips over and spills the corn kernels inside into four haphazard piles:

There are 0 kernels in pile 1

The rooster shoots you a cocky look, daring you to make the first move.