initial amount of nuts = x
at the end of first day (including the night): 2x - 2
at the end of second day (including the night): 2(2x-2) -2 = 4x - 4 - 2 = 4x - 6
at the end of second day (including the night): 2 [4x -6] - 2 = 8x - 12 - 2 = 8x - 14
8x - 14 = 34
x = [34 +14]/8 = 48/8 = 6
Answer: 6