import java.math.BigInteger

object Board {
    fun getGrainCountForSquare(square: Int):BigInteger{
        require(square < 65 && square > 0) {"Only integers between 1 and 64 (inclusive) are allowed"}
        return BigInteger("2").pow(square - 1)
    }

    fun getTotalGrainCount(): BigInteger{
        var returnVal: BigInteger = BigInteger.ZERO

        for (i in 1..64){
            returnVal += getGrainCountForSquare(i)
        }
        return returnVal
    }
}