def count_occurance(s):
    count = 0
    target = "std"
    for i in range(len(s) - len(target) + 1):
        if s[i:i + 3] == target:
            count += 1
    return count