/**
 * Created by IntelliJ IDEA.
 * User: m09bma
 * Date: 21.10.2009
 * Time: 18:01:40
 * To change this template use File | Settings | File Templates.
 */
 import java.util.*;
import java.io.*;
public class New2 {
    public static void main (String[] args) throws Exception{
        Scanner in = new Scanner (new File("count.in"));
        PrintWriter out = new PrintWriter("count.out");
        int k = 0;
        String s3 ="";
        String s1 =in.nextLine();
        String s2 =in.nextLine();
        int length1 = s1.length();
        int length2 = s2.length();
        if (length2 > length1) {
            out.println(0);
        } else{
                 for (int i = 0; i<(length1-length2+1); i++) {
                     s3 = s1.substring(i,i+length2);
                     System.out.println(i + " " + s3);
                     if (s2.equals(s3))
                     {
                         k = k+1;
                          System.out.println(k);
                     }
                    s3 = "";
                 }
                 }
            {
            out.print(k);
            }
        out.println();
        out.close();
        in.close();
}
}
