Solve SRM 529