#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the birthday function below.
def birthday(s, d, m):
    result=0
    n=len(s)
  
    for i in range(0,n):
        c=0
        
        for j in range(0,m):
            if(i+j<n):
                c+=s[i+j] 
                print(c)
        if(c==d):              
            result+=1
    return result
        

