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.indexOf(t) >= 0) { System.out.println(-1); return; } int idx = 0; int count = 0; while ((idx = s.indexOf(t, idx)) >= 0) { count++; idx += t.length() - 1; } System.out.println(count); } }