SRM 608 Div 2 Problem 1