SRM 600 div 2 prob 3