import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String t = sc.next(); int lenT = t.length(); if(lenT == 1) { for(char c : s.toCharArray()) if(c == t.charAt(0)) { System.out.println(-1); return; } System.out.println(0); return; } int cnt = 0; for(int i = 0; i < s.length() - lenT + 1; i++) { if(s.substring(i, i + lenT).equals(t)) { cnt++; i += lenT - 1; } } System.out.println(cnt); } }