#include <iostream>
#include <cstring>
using namespace std;

int main()
{
    char str1[100] = {0}, str2[100] = {0};
    cin.getline(str1, 100);
    cin.getline(str2, 100);

    char *cp1 = str1;
    char *cp2 = str1;
    char *cp3 = str2;

    bool found = true;
    int count = 0;
    int len1 = strlen(str1), len2 = strlen(str2);

    while(cp1 != str1 + len1)
    {
        if(*cp1 == *cp3)
        {
            cp2 = cp1;
            while(cp3 != str2 + len2)
            {
                if(*cp2 != *cp3)
                {
                    found = false;
                    break;
                }
                ++cp2;
                ++cp3;
            }

            if(found)
            {
                ++count;  
            }

            ++cp1;
            cp3 = str2;
            found = true;
        }
        else
        {
            ++cp1;
        }
    }

    cout << count;
}