// A Number is a 64-bit float: every integer is exact only up to 2 ** 53. const asNumber = 2 ** 64 - 1; // A BigInt is exact at any size. Every literal needs the n suffix. function minimumMoves(n) { return 2n ** BigInt(n) - 1n; } console.log(`Number: ${asNumber}`); console.log(`BigInt: ${minimumMoves(64)}`);