diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -2,7 +2,7 @@
 s = input()
 t = input()
 
-if t == s:
+if (t.find(s) == 0) and (t.rfind(s) == m - n):
     print(0)
 elif t.find(s) == 0:
     print(1)
