Coin toss and perfect squares