$ 0 0 link Can someone please help me how to solve this problem. Thank youConstraints for So,S1,N < 10^9