You have to make sure that your device was not preconfigured with a PIN code that you did not choose yourself. When you turn it on for the first time, the device should display 'Welcome to Ledger Nano S'.