Problem 1 in Go