string = 'abcdcdc'
sub_string = 'cdc'
count = 0
for i in range(len(string)):
if string[i:i+len(sub_string)] == sub_string:
count += 1
print(count)
c3RyaW5nID0gJ2FiY2RjZGMnCnN1Yl9zdHJpbmcgPSAnY2RjJwoKY291bnQgPSAwCmZvciBpIGluIHJhbmdlKGxlbihzdHJpbmcpKToKICAgIGlmIHN0cmluZ1tpOmkrbGVuKHN1Yl9zdHJpbmcpXSA9PSBzdWJfc3RyaW5nOgogICAgICAgIGNvdW50ICs9IDEKCnByaW50KGNvdW50KQ==