give array integer num start initial positive value startvaluein iteration calculate step step sum startvalue plus element num leave rightreturn minimum positive value startvalue step step sum 1 example 1input num 32342output 5explanation if choose startvalue 4 iteration step step sum 1step step sumstartvalue 4 startvalue 5 num 4 3 1 5 3 2 3 1 2 3 2 2 4 2 3 3 0 4 3 1 3 0 4 4 1 4 5 4 4 2 6 5 2 7 2example 2input num 12output 1explanation minimum start value positive Example 3input num 123output 5 Constraints1 numslength 100100 numsi 100