Nilo received 10 + 10 = <<10+10=20>>20.

Thus, Ken gave a total of 10 + 20 = <<10+20=30>>30.

Therefore, Ken kept 50 - 30 = <<50-30=20>>20 pencils.

# Answer

20
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Ken had fifty pencils, and he wanted to share some of them with his two friends, Manny and Nilo. Ken gave ten pencils to Manny and ten more pencils to Nilo than he gave to Manny. He kept the rest of the pencils. How many pencils did Ken keep?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
20
Ken had fifty pencils, and he wanted to share some of them with his two friends, Manny and Nilo. Ken gave ten pencils to Manny and ten more pencils to Nilo than he gave to Manny. He kept the rest of the pencils. How many pencils did Ken keep?
train