input stuff for second problem