In the top row of an chessboard, Tom writes the values 1, 2, 4, 8, 16, 32, 64, 128. In the leftmost column, Tom writes the values 1, 3, 9, 27, 81, 243, 729, 2187. In every other square that doesn't have a number yet, Tom writes the product of the leftmost number in that square's row and the topmost number in that square's column. What is the sum of all the numbers on the chessboard?