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(); if (t.length() == 1 && s.contains(t)) { System.out.println(-1); return; } int start = 0; int count = 0; while (true) { int result = s.indexOf(t, start); if (result == -1) { break; } count++; start = result + t.length(); } System.out.println(count); } }