import javax.swing.plaf.synth.SynthTextAreaUI;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.lang.StringBuilder;

public class second {

    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[1000001]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    static long count(int n,int m){
        int row=n/3;
        if(n%3==2)
            row++;
        int column=m/2;
        if(m%2==1)
            column++;
        long ans=row*column;
        if(n%3==1)
        {
            ans += m/3;
            if(m%3==2)
                ans++;
        }
        return ans;

    }

    public static void main(String[] args) throws IOException
    {
        Reader s=new Reader();
        Scanner sc=new Scanner(System.in);
        char a[]=sc.nextLine().toCharArray();
        char b[]=sc.nextLine().toCharArray();
        int ans=0;
        int pre[]=new int[a.length];
        int no1=0;
        if(a[0]=='1')
            pre[0]=1;
        for(int i=1;i<a.length;i++)
        {
            pre[i]=pre[i-1];
            if(a[i]=='1')
                pre[i]++;
        }
        for(int i=0;i<b.length;i++)
            if(b[i]=='1')
                no1++;
            no1=no1%2;
        if(a[b.length-1]%2==no1)
            ans++;
        for(int i=1;i<=a.length-b.length;i++)
            if((a[i-1+b.length]-a[i-1])%2==no1)
                ans++;
        System.out.println(ans);
    }
}


import java.util.Scanner;

public class Vus_The_Cossack_and_Strings {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String a = scan.nextLine();
		String b = scan.nextLine();
		int ans = 0;
		for (int i = 0; i + b.length() <= a.length(); i++) {
			int diff = 0;
			String s = a.substring(i, i + b.length());
			for (int j = 0; j < s.length(); j++) {
				if (s.charAt(j) != b.charAt(j))
					diff++;
			}
			if (diff % 2 == 0)
				ans++;
		}
		System.out.println(ans);
	}
}


import java.util.Scanner;

public class Vus_The_Cossack_and_Strings {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[] A = scan.nextLine().toCharArray(), B = scan.nextLine().toCharArray();
		boolean a = true, b = true;
		for (char c : B)
			b ^= c == '0';
		int st = 0, en = 0;
		while (en < B.length)
			a ^= A[en++] == '0';
		int ans = (a == b) ? 1 : 0;
		while (en < A.length) {
			a ^= A[st++] == '0';
			a ^= A[en++] == '0';
			ans += (a == b) ? 1 : 0;
		}
		System.out.println(ans);
	}
}


import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        char[] a = reader.next().toCharArray();
        char[] b = reader.next().toCharArray();
        int innerSum = a[0] != b[0] ? 0 : 1;
        int diff = 0;
        for (int i = 1; i < b.length; ++i) {
            if (a[i] != b[i])
                innerSum ^= 1;
            if (a[i] != a[i - 1])
                diff ^= 1;
        }
        int ans = innerSum;
        for (int i = b.length; i < a.length; ++i) {
            if (a[i] != a[i - 1])
                diff ^= 1;
            if (i > b.length && a[i - b.length] != a[i - b.length - 1])
                diff ^= 1;
            innerSum ^= diff;
            ans += innerSum;
        }
        System.out.println(ans);

    }
}


package com.company;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int cntb = 0;

        Scanner reader = new Scanner(System.in);
        String a = reader.next();
        String b = reader.next();

        for (int n = 0; n < b.length(); n++) {
            if (b.charAt(n) == '1') {
                cntb++;
            }
        }
        int result = 0;

        //System.out.println(cntb);

        for (int i = 0; i <= a.length() - b.length(); i++) {
            String d = a.substring(i, i + b.length());
            int countOnesInD = 0;
            for (int j = 0; j < d.length(); j++) {
                if (d.charAt(j) == '1') {
                    countOnesInD++;
                }
            }
            if (cntb % 2 == countOnesInD % 2) {
                result++;
            }
        }
        System.out.println(result);
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int cntb = 0;

        Scanner reader = new Scanner(System.in);
        String a = reader.next();
        String b = reader.next();

        for (int n = 0; n < b.length(); n++) {
            if (b.charAt(n) == '1') {
                cntb++;
            }
        }
        int result = 0;

        //System.out.println(cntb);

        for (int i = 0; i <= a.length() - b.length(); i++) {
            String d = a.substring(i, i + b.length());
            int countOnesInD = 0;
            for (int j = 0; j < d.length(); j++) {
                if (d.charAt(j) == '1') {
                    countOnesInD++;
                }
            }
            if (cntb % 2 == countOnesInD % 2) {
                result++;
            }
        }
        System.out.println(result);
    }
}


//make sure to make new file!
import java.io.*;
import java.util.*;

public class C571{

   public static void main(String[] args)throws IOException{
      BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
      PrintWriter out = new PrintWriter(System.out);

      char[] a = f.readLine().toCharArray();
      char[] b = f.readLine().toCharArray();

      int answer = 0;
      boolean last = false;

      int n = a.length;
      int m = b.length;

      int count = 0;
      for(int k = 0; k < m; k++){
         if(a[k] != b[k]){
            count++;
         }
      }

      if(count%2 == 0){
         answer++;
         last = true;
      }

      for(int k = 0; k < n-m; k++){
         if((a[k] == a[k+1]) == (a[k+m-1] == a[k+m])){
            if(last) answer++;
         } else {
            if(!last)answer++;
            last = !last;
         }
      }

      out.println(answer);

      out.close();
   }

}


//make sure to make new file!
import java.io.*;
import java.util.*;

public class C571{

   public static void main(String[] args)throws IOException{
      BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
      PrintWriter out = new PrintWriter(System.out);

      char[] a = f.readLine().toCharArray();
      char[] b = f.readLine().toCharArray();

      int answer = 0;
      boolean last = false;

      int n = a.length;
      int m = b.length;

      int count = 0;
      for(int k = 0; k < m; k++){
         if(a[k] != b[k]){
            count++;
         }
      }

      if(count%2 == 0){
         answer++;
         last = true;
      }

      for(int k = 0; k < n-m; k++){
         int diff = 0;

         if(a[k] == a[k+m]){
            if(last) answer++;
         } else {
            if(!last)answer++;
            last = !last;
         }
      }

      out.println(answer);

      out.close();
   }

}


import java.util.Scanner;

public class Vus_the_Cossack_and_Strings {

	static int[] A = new int[1000009];
	static int result;
	static String S1, S2;

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		S1 = scan.nextLine();
		S2 = scan.nextLine();
		int size1 = S1.length(), size2 = S2.length();
		int temp = 0;
		for(int i = 0; i < size1; ++i) {
			if (i < size2 && S1.charAt(i) != S2.charAt(i))
				temp++;
			if (i == size2 - 1) {
				temp %= 2;
				result += temp*(-1) + 1;
			}
			if (i >= size2) {
				if(S1.charAt(i) != S1.charAt(i - size2))
					temp = temp*(-1) + 1;
				result += temp*(-1) + 1;
			}
		}
		System.out.print(result);
	}
}


import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int MOD=1000000000+7;

    //Brian Kernighan’s Algorithm
    static int countSetBits(int n)
    {
        int count = 0;
        while (n > 0)
        {
            n &= (n - 1) ;
            count++;
        }
        return count;
    }

    static long factorial(long n){
        if(n==1) return 1;
        if(n==2) return 2;
        if(n==3) return 6;
        return n*factorial(n-1);
    }
    //Euclidean Algorithm
    static long gcd(long A,long B){
        if(B==0) return A;
        return gcd(B,A%B);
    }

    static long fastExpo(long x,long n){
        if(n==0) return 1;
        if((n&1)==0) return fastExpo((x*x)%MOD,n/2);
        return ((x%MOD)*fastExpo((x*x)%MOD,(n-1)/2));
    }
    //AKS Algorithm
    static boolean isPrime(long n){
        if(n<=1) return false;
        if(n<=3) return true;
        if(n%2==0 || n%3==0) return false;
        for(int i=5;i*i<=n;i+=6)
            if(n%i==0 || n%(i+2)==0) return false;
        return true;
    }
    public static void main (String[] args) throws java.lang.Exception
    {
        FastReader sc=new FastReader();
        String a=sc.nextLine();
        String b=sc.nextLine();
        int len_b=b.length();
        int len_a=a.length();
        int n=Integer.parseInt(b,2);
        StringBuilder s=new StringBuilder();
        int count=0;
        for(int i=0;i<len_b;i++)
            s.append(a.charAt(i));
        int ans=countSetBits((Integer.parseInt(s.toString(),2)^n));
		count+=(ans%2==0)?1:0;
		for(int i=len_b;i<len_a;i++){
			s.deleteCharAt(0);
			s.append(a.charAt(i));
			ans=countSetBits((Integer.parseInt(s.toString(),2)^n));
			count+=(ans%2==0)?1:0;
		}
		System.out.println(count);
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int MOD=1000000000+7;

    //Brian Kernighan’s Algorithm
    static long countSetBits(long n)
    {
        long count = 0;
        while (n > 0)
        {
            n &= (n - 1) ;
            count++;
        }
        return count;
    }

    static long factorial(long n){
        if(n==1) return 1;
        if(n==2) return 2;
        if(n==3) return 6;
        return n*factorial(n-1);
    }
    //Euclidean Algorithm
    static long gcd(long A,long B){
        if(B==0) return A;
        return gcd(B,A%B);
    }

    static long fastExpo(long x,long n){
        if(n==0) return 1;
        if((n&1)==0) return fastExpo((x*x)%MOD,n/2);
        return ((x%MOD)*fastExpo((x*x)%MOD,(n-1)/2));
    }
    //AKS Algorithm
    static boolean isPrime(long n){
        if(n<=1) return false;
        if(n<=3) return true;
        if(n%2==0 || n%3==0) return false;
        for(int i=5;i*i<=n;i+=6)
            if(n%i==0 || n%(i+2)==0) return false;
        return true;
    }
    public static void main (String[] args) throws java.lang.Exception
    {
        FastReader sc=new FastReader();
        String a=sc.nextLine();
        String b=sc.nextLine();
        int len_b=b.length();
        int len_a=a.length();
        int n=Integer.parseInt(b,2);
        StringBuilder s=new StringBuilder();
        long count=0;
        for(int i=0;i<len_b;i++)
            s.append(a.charAt(i));
        long ans=countSetBits((Integer.parseInt(s.toString(),2)^n));
		count+=(ans%2==0)?1:0;
		for(int i=len_b;i<len_a;i++){
			s.deleteCharAt(0);
			s.append(a.charAt(i));
			ans=countSetBits((Integer.parseInt(s.toString(),2)^n));
			count+=(ans%2==0)?1:0;
		}
		System.out.println(count);
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int MOD=1000000000+7;

    //Brian Kernighan’s Algorithm
    static int countSetBits(int n)
    {
        int count = 0;
        while (n > 0)
        {
            n &= (n - 1) ;
            count++;
        }
        return count;
    }

    static long factorial(long n){
        if(n==1) return 1;
        if(n==2) return 2;
        if(n==3) return 6;
        return n*factorial(n-1);
    }
    //Euclidean Algorithm
    static long gcd(long A,long B){
        if(B==0) return A;
        return gcd(B,A%B);
    }

    static long fastExpo(long x,long n){
        if(n==0) return 1;
        if((n&1)==0) return fastExpo((x*x)%MOD,n/2);
        return ((x%MOD)*fastExpo((x*x)%MOD,(n-1)/2));
    }
    //AKS Algorithm
    static boolean isPrime(long n){
        if(n<=1) return false;
        if(n<=3) return true;
        if(n%2==0 || n%3==0) return false;
        for(int i=5;i*i<=n;i+=6)
            if(n%i==0 || n%(i+2)==0) return false;
        return true;
    }
    public static void main (String[] args) throws java.lang.Exception
    {
        FastReader sc=new FastReader();
        String a=sc.nextLine();
        String b=sc.nextLine();
        int len_b=b.length();
        int len_a=a.length();
        try{
        	int n=Integer.parseInt(b,2);
	        StringBuilder s=new StringBuilder();
	        int count=0;
	        for(int i=0;i<len_b;i++)
	            s.append(a.charAt(i));
	        int ans=countSetBits((Integer.parseInt(s.toString(),2)^n));
			count+=(ans%2==0)?1:0;
			for(int i=len_b;i<len_a;i++){
				s.deleteCharAt(0);
				s.append(a.charAt(i));
				ans=countSetBits((Integer.parseInt(s.toString(),2)^n));
				count+=(ans%2==0)?1:0;
			}
			System.out.println(count);
        }
        catch(Exception e){
        	System.out.println(a);
        	System.out.println(b);
        }

    }
}


import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int MOD=1000000000+7;

    //Brian Kernighan’s Algorithm
    static long countSetBits(long n)
    {
        long count = 0;
        while (n > 0)
        {
            n &= (n - 1) ;
            count++;
        }
        return count;
    }

    static long factorial(long n){
        if(n==1) return 1;
        if(n==2) return 2;
        if(n==3) return 6;
        return n*factorial(n-1);
    }
    //Euclidean Algorithm
    static long gcd(long A,long B){
        if(B==0) return A;
        return gcd(B,A%B);
    }

    static long fastExpo(long x,long n){
        if(n==0) return 1;
        if((n&1)==0) return fastExpo((x*x)%MOD,n/2);
        return ((x%MOD)*fastExpo((x*x)%MOD,(n-1)/2));
    }
    //AKS Algorithm
    static boolean isPrime(long n){
        if(n<=1) return false;
        if(n<=3) return true;
        if(n%2==0 || n%3==0) return false;
        for(int i=5;i*i<=n;i+=6)
            if(n%i==0 || n%(i+2)==0) return false;
        return true;
    }
    public static void main (String[] args) throws java.lang.Exception
    {
        FastReader sc=new FastReader();
        String a=sc.nextLine();
        String b=sc.nextLine();
        int len_b=b.length();
        int len_a=a.length();
        int prefix[]=new int[len_a+1];
        prefix[0]=0;
        for(int i=0;i<len_a;i++) prefix[i+1]=prefix[i]+((a.charAt(i)=='0')?0:1);
        int c=0;
        for(int i=0;i<len_b;i++) c+=(b.charAt(i)=='1'?1:0);
        int ans=0;
        for(int i=len_b;i<=len_a;i++){
        	if((prefix[i]-prefix[i-len_b]+c)%2==0) ans+=1;
        }
		System.out.println(ans);
    }
}


import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        //Scanner scanner = new Scanner(new FileInputStream(new File("test")));

        String a = scanner.next();
        String b = scanner.next();
        scanner.close();

        int B = Integer.parseInt(b, 2);
        int k = a.length() - b.length();
        int res = 0;

        for (int i = 0; i <= k; i++) {
            String s = a.substring(i, a.length() - k + i);
            int A = Integer.parseInt(s, 2);

            if (foo(A^B)) res++;
        }
        System.out.println(res);
    }

    private static boolean foo(int val) {
        int count = 0;

        while (val > 0)
        {
            if ((val & 1) > 0)  count++;
            val = (val >> 1);
        }
        return (count & 1) == 0;
    }
}


import java.io.File;
import java.io.FileInputStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        //anner scanner = new Scanner(new FileInputStream(new File("test")));

        char[] a = scanner.next().toCharArray();
        char[] b = scanner.next().toCharArray();
        scanner.close();

        int k = a.length - b.length;

        int res = 0;
        for (int i = 0; i <= k; i++) {
            if (foo(a, b, i)) res++;
        }
        System.out.println(res);
    }

    static boolean foo(char[] a, char[] b, int pos) {
        int res = 0;
        for (int i = 1; i <= b.length; ++i) {
            if (b[b.length - i] != a[a.length - i - pos]) res++;
        }
        //System.out.println(Arrays.toString(a));
        //System.out.println(Arrays.toString(b));
        //System.out.println(pos);
        //System.out.println(res);
        return res % 2 == 0;
    }
}


import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        //Scanner scanner = new Scanner(new FileInputStream(new File("test")));
        Scanner scanner = new Scanner(System.in);

        String A = scanner.next();
        String B = scanner.next();

        int length = B.length();
        long b = count(B);
        String s = A.substring(0, length);
        //System.out.printf("str: %s, pos: %d, s: %s\n", A, 0, s);

        long a = count(s);
        //System.out.printf("count: %d\n", a);
        int sum = 0;

        if (check(a, b)) sum++;

        for (int i = 1; i <= A.length() - length; i++) {
            a = count(A, a, i, i + length);
            //System.out.printf("count: %d\n", a);
            if (check(a, b)) sum++;
        }

        System.out.println(sum);

        scanner.close();
    }

    static long count(String str, long count, int start, int end) {
        //System.out.printf("str: %s, pos: %d, s: %s\n", str, start, str.substring(start, end));
        count -= str.charAt(start-1) - '0';
        count += str.charAt(end-1) - '0';
        return count;
    }

    static long count(String str) {
        return str.chars().filter(value -> value == '1').count();
    }

    static boolean check(long a, long b) {
        return (1 & (a ^ b)) == 0;
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        int c=0;
        for(int i=0;i<l;i++)if(b.charAt(i)=='1')c++;
        for(int i=0;i+l<=la;i++) {
        	String str=a.substring(i,i+l);
        	int c1=0;
        	for(int j=0;j<l;j++) {
        		if(str.charAt(j)==1)c1++;
        	}
        	if(c==c1)count++;
        }
        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        for(int i=0;i+l<la;i++) {
        	String str=a.substring(i,i+l+1);
        	int c=0;
        	for(int j=0;j<l;j++) {
        		if(str.charAt(j)!=b.charAt(j))c++;
        	}
        	if(c%2==0)count++;
        }
        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        int c=0;
        for(int i=0;i<l;i++)if(b.charAt(i)=='1')c++;
        int[] T=new int[la-l+1];

        int c1=0;
        for(int i=0;i<l;i++) {
        	if(a.charAt(i)=='1')c1++;
        }
        T[0]=c1;

        for(int i=l;i<la;i++) {
        	if(a.charAt(i)=='1' && a.charAt(i-l)=='1')T[i-l+1]=T[i-l];
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='1')T[i-l+1]=T[i-l]+1;
        	else if(a.charAt(i)=='1' && a.charAt(i-l)=='0')T[i-l+1]=T[i-l]-1;
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='0')T[i-l+1]=T[i-l];
        }

        for(int i=0;i<T.length;i++) {
        	if(T[i]%2==c%2)count++;
        }

        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        int c=0;
        for(int i=0;i<l;i++)if(b.charAt(i)=='1')c++;
        for(int i=0;i+l<=la;i++) {
        	String str=a.substring(i,i+l);
        	int c1=0;
        	for(int j=0;j<l;j++) {
        		if(str.charAt(j)=='1')c1++;
        	}
        	if(c%2==c1%2)count++;
        }
        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        int c=0;
        for(int i=0;i<l;i++)if(b.charAt(i)=='1')c++;
        int[] T=new int[la-l+1];

        int c1=0;
        for(int i=0;i<=l;i++) {
        	if(a.charAt(i)=='1')c1++;
        }
        T[0]=c1;

        for(int i=l+1;i<la;i++) {
        	if(a.charAt(i)=='1' && a.charAt(i-l)=='1')T[i-l]=T[i-l-1];
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='1')T[i-l]=T[i-l-1]+1;
        	else if(a.charAt(i)=='1' && a.charAt(i-l)=='0')T[i-l]=T[i-l-1]-1;
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='0')T[i-l]=T[i-l-1];
        }

        for(int i=0;i<T.length;i++) {
        	if(T[i]%2==c%2)count++;
        }

        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        int c=0;
        for(int i=0;i<l;i++)if(b.charAt(i)=='1')c++;
        int[] T=new int[la-l+1];

        int c1=0;
        for(int i=0;i<l;i++) {
        	if(a.charAt(i)=='1')c1++;
        }
        T[0]=c1;

        for(int i=l;i<la;i++) {
        	if(a.charAt(i)=='1' && a.charAt(i-l)=='1')T[i-l+1]=T[i-l];
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='1')T[i-l+1]=T[i-l]-1;
        	else if(a.charAt(i)=='1' && a.charAt(i-l)=='0')T[i-l+1]=T[i-l]+1;
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='0')T[i-l+1]=T[i-l];
        }

        for(int i=0;i<T.length;i++) {
        	if(T[i]%2==c%2)count++;
        }

        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        for(int i=0;i+l<=la;i++) {
        	String str=a.substring(i,i+l);
        	int c=0;
        	for(int j=0;j<l;j++) {
        		if(str.charAt(j)!=b.charAt(j))c++;
        	}
        	if(c%2==0)count++;
        }
        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        for(int i=0;i+l<la;i++) {
        	String str=a.substring(i,i+l);
        	int c=0;
        	for(int j=0;j<l;j++) {
        		if(str.charAt(j)!=b.charAt(j))c++;
        	}
        	if(c%2==0)count++;
        }
        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	static Random random;
	private static void mySort(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
        Arrays.sort(s);
    }

	static class Pair{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x=x;
			this.y=y;
		}
	}

	public static void sortPairX(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.x-o2.x;
			}
		});
	}

	public static void sortPairY(Pair[] p) {
		Arrays.sort(p, new Comparator<Pair>() {
			public int compare(Pair o1, Pair o2) {
				return o1.y-o2.y;
			}
		});
	}

	public static void main(String[] args) {
		random = new Random(543534151132L + System.currentTimeMillis());
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        String a=in.next();
        String b=in.next();
        int l=b.length();
        int la=a.length();

        int count=0;
        int c=0;
        for(int i=0;i<l;i++)if(b.charAt(i)=='1')c++;
        int[] T=new int[la-l+1];

        int c1=0;
        for(int i=0;i<=l;i++) {
        	if(a.charAt(i)=='1')c1++;
        }
        T[0]=c1;

        for(int i=l+1;i<la;i++) {
        	if(a.charAt(i)=='1' && a.charAt(i-l)=='1')T[i-l]=T[i-l-1];
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='1')T[i-l]=T[i-l-1]+1;
        	else if(a.charAt(i)=='1' && a.charAt(i-l)=='0')T[i-l]=T[i-l-1]-1;
        	else if(a.charAt(i)=='0' && a.charAt(i-l)=='0')T[i-l]=T[i-l-1];
        }

        for(int i=0;i<T.length;i++) {
        	if(T[i]%2==c%1)count++;
        }

        out.println(count);

		out.close();

	}

	public static int gcd(int a, int b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.intValue();
    }

    public static long gcd(long a, long b)
    {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
            return gcd.longValue();
    }

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public float nextFloat() {
            return Float.parseFloat(next());
        }

    }

}


//package codeforces;

import java.util.Scanner;

public class CossackAndString {
public static void main(String[] args) {
	Scanner scan=new Scanner(System.in);
	String a=scan.next();
	String b=scan.next();
	int count0=0;
	int count=0;
	int ans=0;
	for(int i=0;i<b.length();i++) {
		if(b.charAt(i)=='0')count0++;
		if(a.charAt(i)=='0')count++;
	}
	if((count0+count)%2==0)ans++;
	for(int i=b.length();i<a.length();i++) {
		if(a.charAt(i)=='0')count++;
		if(a.charAt(i-b.length())=='0')count--;
		if((count+count0)%2==0)ans++;
	}
	System.out.println(ans);
}
}


//package codeforces;

import java.util.Scanner;

public class CossackAndStrinfs {
public static void main(String[] args) {
	Scanner scan=new Scanner(System.in);
	String a=scan.next();
	String b=scan.next();
	int count=0,countt=0;
	for(int i=0;i<=a.length()-b.length();i++) {
		String c=a.substring(i,i+b.length());

		for(int j=0;j<c.length();j++) {
			if(b.charAt(j)!=c.charAt(j))
			{count++;}
			}
		if(count%2==0)countt++;
		count=0;
	}
	System.out.println(countt);
}
}


import java.util.*;

import java.io.*;

public class Exam {

	public static long mod = (long) Math.pow(10, 9)+7 ;
	public static InputReader sc = new InputReader(System.in);
	public static PrintWriter pw = new PrintWriter(System.out);
	public static int shift(int a[],int n){
		int d[][]=new int[2][a.length];
		if(a.length%n==0){
			for(int i=0;i<n;i++){
				//d[0][i]=0;
				for(int j=i;j<a.length;j+=n){
					//if((d[0][j]==0&&a[j]==1)||(d[0][j]==1&&a[j]==0))
					d[1][j]=d[0][j]^a[j];
					if(j+n<a.length)
					d[0][j+n]=d[1][j];
					else{
						if(d[1][j]!=d[0][i])
						return 0;
					}
				}
			}
		}
		else{
			return shift(a, gcd(a.length,n));
		}

		//pw.println(n);
		return 1;
	}
	public static int gcd(int a,int b){
		if(b==0)
		return a;
		else
		return gcd(b,a%b);
	}

	public static void main(String[] args) {

		// Code starts..
		String s1=sc.nextLine();
		String s2=sc.nextLine();
		//int a[]=new int[s2.length()];
		int t=0,c=0;
		for(int i=0;i<=s1.length()-s2.length();i++){
			t=0;
			for(int j=i;j<i+s2.length();j++){
				if(s2.charAt(j-i)!=s1.charAt(j))
				t++;
			}
			//pw.println(t);
			if(t%2==0)
			c++;
		}
		pw.println(c);
		// Code ends...
		pw.flush();
		pw.close();
	}

	public static String reverseString(String s){
		StringBuilder input1 = new StringBuilder();
        input1.append(s);
		input1 = input1.reverse();
		return input1.toString();
	}
	public static int[] scanArray(int n){
		int a[]=new int [n];
		for(int i=0;i<n;i++)
		a[i]=sc.nextInt();

		return a;
	}
	public static long[] scanLongArray(int n){
		long a[]=new long [n];
		for(int i=0;i<n;i++)
		a[i]=sc.nextLong();

		return a;
	}
	public static String [] scanStrings(int n){
		String a[]=new String [n];
		for(int i=0;i<n;i++)
		a[i]=sc.nextLine();

		return a;
	}
	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}


import java.util.*;

import java.io.*;

public class Exam {

	public static long mod = (long) Math.pow(10, 9)+7 ;
	public static InputReader sc = new InputReader(System.in);
	public static PrintWriter pw = new PrintWriter(System.out);
	public static int shift(int a[],int n){
		int d[][]=new int[2][a.length];
		if(a.length%n==0){
			for(int i=0;i<n;i++){
				//d[0][i]=0;
				for(int j=i;j<a.length;j+=n){
					//if((d[0][j]==0&&a[j]==1)||(d[0][j]==1&&a[j]==0))
					d[1][j]=d[0][j]^a[j];
					if(j+n<a.length)
					d[0][j+n]=d[1][j];
					else{
						if(d[1][j]!=d[0][i])
						return 0;
					}
				}
			}
		}
		else{
			return shift(a, gcd(a.length,n));
		}

		//pw.println(n);
		return 1;
	}
	public static int gcd(int a,int b){
		if(b==0)
		return a;
		else
		return gcd(b,a%b);
	}
	public static int diferenceCharacterInBitString(String s1,String s2){
		//For example, let s1=00110, and s2=11000. In these strings, the first, second, third and fourth positions are different.
		//Vus the Cossack counts the number of such substrings c such that f(s1,s2) is even(1186/c) for all substring of s1 of size s2.
		// it is solve using parity of(s1==s2)then diff is even otherwise odd;
		int t1=0,t2=0,c=0;
		for(int i=0;i<s2.length();i++){
			if(s1.charAt(i)=='1')
			t1++;
			if(s2.charAt(i)=='1')
			t2++;
		}
		if(t1%2==t2%2)
		c++;

		for(int i=s2.length();i<s1.length();i++){
			if(s1.charAt(i)=='1')
			t1++;
			if(s1.charAt(i-s2.length())=='1')
			t1--;
			if(t1%2==t2%2)
			c++;
		}
		return c;
	}

	public static void main(String[] args) {

		// Code starts..
		String s1=sc.nextLine();
		String s2=sc.nextLine();
		//int a[]=new int[s2.length()];
		pw.println(diferenceCharacterInBitString(s1, s2));
		// Code ends...
		pw.flush();
		pw.close();
	}

	public static String reverseString(String s){
		StringBuilder input1 = new StringBuilder();
        input1.append(s);
		input1 = input1.reverse();
		return input1.toString();
	}
	public static int[] scanArray(int n){
		int a[]=new int [n];
		for(int i=0;i<n;i++)
		a[i]=sc.nextInt();

		return a;
	}
	public static long[] scanLongArray(int n){
		long a[]=new long [n];
		for(int i=0;i<n;i++)
		a[i]=sc.nextLong();

		return a;
	}
	public static String [] scanStrings(int n){
		String a[]=new String [n];
		for(int i=0;i<n;i++)
		a[i]=sc.nextLine();

		return a;
	}
	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}


import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.zip.Inflater;

public class Main {
    private static AWriter writer = new AWriter(System.out);
    private static AReader reader = new AReader(System.in);
    private static final int INF=0X3F3F3F3F;
    private static int MAXN=6000+5;
    private static int MAXM=4000+5;
    private static int m,n,N,s,t;
    private static int[] dis;
    private static int[] head;
    private static boolean[] vis;
    private static int[] lev;
    private static int tot;
    private static Edge[][] edges;
    static class Edge{
        int flow,cap;
        public Edge() {
            this.flow = 0;
            this.cap = 0;
        }
    }
    private static int dfs(int s,int t,int flow){
        if(s==t)
            return flow;
        int now=flow;
        for(int i=0;i<N;i++){
            if(lev[i]==lev[s]+1&&edges[s][i].cap>edges[s][i].flow){
                int min=Math.min(now,edges[s][i].cap-edges[s][i].flow);
                int nowFlow=dfs(i,t,min);
                edges[s][i].flow+=nowFlow;
                edges[i][s].flow-=nowFlow;
                now-=nowFlow;
            }
            if(now==0)
                break;
        }
        return flow-now;
    }
    private static boolean bfs(int s,int t){
        lev=new int[MAXN];
        Queue<Integer> queue=new LinkedBlockingQueue<>();
        queue.add(s);
        lev[s]=1;
        while(!queue.isEmpty()){
            int u=queue.poll();
            for(int i=0;i<N;i++){
                if(lev[i]==0&&edges[u][i].cap>edges[u][i].flow){
                    lev[i]=lev[u]+1;
                    queue.add(i);
                }
            }
        }
        return lev[t]!=0;
    }
    private static void dinic(int s,int t){
        int flow=0,tf=0;
        while(bfs(s,t)){
            while((tf=dfs(s,t,INF))!=0){
                flow+=tf;
            }
        }
    }
    private static char[] a,b;
    private static int k;
    public static void main(String[] args) throws IOException {
        a=reader.next().toCharArray();
        b=reader.next().toCharArray();
        int cnt=0,cnt2=0,ans=0;
        for(int i=0;i<b.length;i++) {
            cnt+=b[i]=='1'?1:0;
            cnt2+=a[i]=='1'?1:0;
        }
        if(cnt%2==cnt2%2)
            ans++;
        for(int i=0;i<a.length-b.length;i++) {
            cnt2+=a[i+b.length]=='1'?1:0;
            cnt2-=a[i]=='1'?1:0;
            if(cnt%2==cnt2%2)
                ans++;
        }
        writer.println(ans);
        writer.close();
        reader.close();
    }
}

class AReader implements Closeable {
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    public AReader(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
        tokenizer = new StringTokenizer("");
    }
    private String innerNextLine() {
        try {
            return reader.readLine();
        } catch (IOException ex) {
            return null;
        }
    }
    public boolean hasNext() {
        while (!tokenizer.hasMoreTokens()) {
            String nextLine = innerNextLine();
            if (nextLine == null) {
                return false;
            }
            tokenizer = new StringTokenizer(nextLine);
        }
        return true;
    }
    public String nextLine() {
        tokenizer = new StringTokenizer("");
        return innerNextLine();
    }
    public String next() {
        hasNext();
        return tokenizer.nextToken();
    }
    public int nextInt() {
        return Integer.valueOf(next());
    }
    public long nextLong() {
        return Long.valueOf(next());
    }
    public double nextDouble() {
        return Double.valueOf(next());
    }
    public BigDecimal nextBigDecimal(){ return new BigDecimal(next()); }
    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }
    @Override
    public void close() throws IOException {
        reader.close();
    }
}

// Fast writer for ACM By Azure99
class AWriter implements Closeable {
    private BufferedWriter writer;

    public AWriter(OutputStream outputStream) {
        writer = new BufferedWriter(new OutputStreamWriter(outputStream));
    }

    public void print(Object object) throws IOException {
        writer.write(object.toString());
    }

    public void println(Object object) throws IOException {
        writer.write(object.toString());
        writer.write("\n");
    }

    @Override
    public void close() throws IOException {
        writer.close();
    }
}

class model{
//    private static void dijkstra(int start){
//        PriorityQueue<Main.Node> queue=new PriorityQueue<>();
//        queue.add(new Main.Node(start,0));
//        dis[start][0]=0;
//        while(!queue.isEmpty()){
//            Main.Node node=queue.poll();
//            int law=node.mes/n;
//            int u=node.mes%n;
//            if(vis[u][law])
//                continue;
//            vis[u][law]=true;
//            for(int i=head[u];i!=-1;i=edges[i].next){
//                int v = edges[i].to;
//                if (dis[v][law] > dis[u][law] + edges[i].w) {
//                    dis[v][law] = dis[u][law] + edges[i].w;
//                    queue.add(new Main.Node(v+law*n,dis[v][law]));
//                }
//                if(law<k&&dis[v][law+1]>dis[u][law]){
//                    dis[v][law+1] = dis[u][law];
//                    queue.add(new Main.Node(v+(law+1)*n,dis[v][law+1]));
//                }
//            }
//        }
//    }
}


import java.util.*;
import java.io.*;

public class problem2 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String a = br.readLine();
		String b = br.readLine();
		int count1 = 0;
		int count2 = 0;
		for(int i=0;i<b.length();i++) {
			if(a.charAt(i) == '1')count1++;
			if(b.charAt(i) == '1')count2++;
		}
		ArrayList<Integer>A = new ArrayList<>();
		A.add(count1);
		for(int i = b.length();i<a.length();i++) {
			int j = i-b.length();
			if(a.charAt(i) == '1' && a.charAt(j) == '0') {
				int temp  = A.size();
				int v = A.get(temp-1);
				A.add(v+1);
			}
			else if(a.charAt(i) == '0' && a.charAt(j) == '1') {
				int temp  = A.size();
				int v = A.get(temp-1);
				A.add(v-1);
			}
			else {
				int temp  = A.size();
				int v = A.get(temp-1);
				A.add(v);
			}
		}
		int ans = 0;
		for(int i=0;i<A.size();i++) {
			int get = A.get(i);
			if(get%2 == count2%2)ans++;
		}
		System.out.println(ans);
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Random;
import java.io.PrintWriter;
/*
    Solution Created: 16:57:27 02/07/2019
    Custom Competitive programming helper.
*/

public class Main {
	public static void solve(Reader in, Writer out) {
		char[] a = in.next().toCharArray();
		char[] b = in.next().toCharArray();
		int cnt = 0;
		for(char c : b) if(c=='1') cnt++;
		int cnt2 = 0;
		for(int i = 0; i<b.length; i++) if(a[i]=='1') cnt++;
		int ans = (cnt+cnt2+1)%2;
		for(int i = b.length; i<a.length; i++) {
			if(a[i]=='1') cnt2++;
			if(a[i-b.length]=='1') cnt2--;
			ans+=(cnt+cnt2+1)%2;
		}
		out.println(ans);
	}

	public static void main(String[] args) {
		Reader in = new Reader();
		Writer out = new Writer();
		solve(in, out);
		out.exit();
	}

static class Graph {
	private ArrayList<Integer> con[];
	private boolean[] visited;

	public Graph(int n) {
		con = new ArrayList[n];
		for (int i = 0; i < n; ++i)
			con[i] = new ArrayList();
		visited = new boolean[n];
	}

	public void reset() {
		Arrays.fill(visited, false);
	}

	public void addEdge(int v, int w) {
		con[v].add(w);
	}

	public void dfs(int cur) {
		visited[cur] = true;
		for (Integer v : con[cur]) {
			if (!visited[v]) {
				dfs(v);
			}
		}
	}
}

static class Reader {
	static BufferedReader br;
	static StringTokenizer st;
	private int charIdx = 0;
	private String s;

	public Reader() {
		this.br = new BufferedReader(new InputStreamReader(System.in));
	}

	public int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public double[] nd(int n) {
		double[] a = new double[n];
		for (int i = 0; i < n; i++)
			a[i] = nextDouble();
		return a;
	}

	public char nextChar() {
		if (s == null || charIdx >= s.length()) {
			if (st == null || !st.hasMoreTokens())
				try {
					readLine();
				} catch (Exception e) {
				}
			s = st.nextToken();
			charIdx = 0;
		}
		return s.charAt(charIdx++);
	}

	public long[] nl(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}

	public char[] nca() {
		return next().toCharArray();
	}

	public String[] nS(int n) {
		String[] a = new String[n];
		for (int i = 0; i < n; i++)
			a[i] = next();
		return a;
	}

	public int nextInt() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Integer.parseInt(st.nextToken());
	}

	public double nextDouble() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Double.parseDouble(st.nextToken());
	}

	public Long nextLong() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Long.parseLong(st.nextToken());
	}

	public String next() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return st.nextToken();
	}

	public static void readLine() {
		try {
			st = new StringTokenizer(br.readLine());
		} catch (Exception e) {
		}
	}
}

static class Sort {
	static Random random = new Random();
	public static void sortArray(int[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
	public static void sortArray(long[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
	public static void sortArray(String[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
	public static void sortArray(char[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
    private static void shuffle(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
    private static void shuffle(long[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            long t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
    private static void shuffle(String[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            String t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
    private static void shuffle(char[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            char t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
}

static class Util{
	    static boolean isPrime(int n) {
	        if (n <= 1) return false;
	        if (n <= 3) return true;
	        if (n % 2 == 0 || n % 3 == 0) return false;
	        for (int i = 5; i * i <= n; i = i + 6)
	            if (n % i == 0 || n % (i + 2) == 0)
	            return false;
	        return true;
	    }
		public static int upperBound(long[] a, long v) {
			if(a[0]>v) return -1;
			int l=0,h=a.length-1;
			while(l<h) {
				int mid = (l+h)/2;
				if(v>=a[mid]) l = mid+1;
				else h = mid-1;
			}
			if(v<a[l]) return l-1;
			return l;
		}
		public static int lowerBound(long[] a, int v) {
			if(a[a.length-1]<v) return -1;
			int l=0,h=a.length-1;
			while(l<h) {
				int mid = (l+h)/2;
				if(v<=a[mid]) h = mid-1;
				else l = mid+1;
			}
			if(v>a[l]) return l+1;
			return l;
		}
	    public static boolean[] getSieve(int n) {
	        boolean[] isPrime = new boolean[n+1];
	        for (int i = 2; i <= n; i++) isPrime[i] = true;
	        for (int i = 2; i*i <= n; i++) if (isPrime[i])
	                for (int j = i; i*j <= n; j++) isPrime[i*j] = false;
	        return isPrime;
	    }
	    public static int gcd(int a, int b) {
	        if (a == 0)
	            return b;
	        return gcd(b%a, a);
	    }
		public static long modAdd(long a, long b, long mod) {
			return (a%mod+b%mod)%mod;
		}
		public static long modMul(long a, long b, long mod) {
			return ((a%mod)*(b%mod))%mod;
		}
		public static void dbg(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
	}

static class Writer {
	private PrintWriter pw;
	public Writer(){
		pw = new PrintWriter(System.out);
	}

	public void printArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void printArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void print(Object o) {
		pw.print(o.toString());
	}
	public void println(Object o) {
		pw.println(o.toString());
	}
	public void println() {
		pw.println();
	}
	public void flush() {
		pw.flush();
	}
	public void exit() {
		pw.close();
	}
}
}


import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Random;
import java.io.PrintWriter;
/*
    Solution Created: 12:26:32 28/06/2019
    Custom Competitive programming helper.
*/

public class Main {
	public static void solve(Reader in, Writer out) {
		char[] a = in.next().toCharArray();
		char[] b = in.next().toCharArray();
		BigInteger two = new BigInteger("2");
		BigInteger one = new BigInteger("1");
		BigInteger bv = new BigInteger("0");
		BigInteger pow = new BigInteger("1");
		for(int i = 0; i<b.length; i++) {
			char c = b[b.length-i-1];
			if(c=='1') bv = bv.add(pow);
			pow = pow.multiply(two);
		}
		pow = pow.divide(two);
		BigInteger av = new BigInteger("0");
		BigInteger pow2 = new BigInteger("1");
		for(int i = 0; i<b.length; i++) {
			char c = a[b.length-i-1];
			if(c=='1') av = av.add(pow2);
			pow2 = pow2.multiply(two);
		}
		int ans = 0;
		BigInteger res = av.xor(bv);
		ans+= (res.bitCount()+1)%2;
		for(int i = b.length; i<a.length; i++) {
			char rem = a[i-b.length];
			char add = a[i];
			if(rem=='1') av = av.subtract(pow);
			av = av.multiply(two);
			if(add=='1') av = av.add(one);
			res = av.xor(bv);
			ans+= (res.bitCount()+1)%2;
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		Reader in = new Reader();
		Writer out = new Writer();
		solve(in, out);
		out.exit();
	}

static class Graph {
	private ArrayList<Integer> con[];
	private boolean[] visited;

	public Graph(int n) {
		con = new ArrayList[n];
		for (int i = 0; i < n; ++i)
			con[i] = new ArrayList();
		visited = new boolean[n];
	}

	public void reset() {
		Arrays.fill(visited, false);
	}

	public void addEdge(int v, int w) {
		con[v].add(w);
	}

	public void dfs(int cur) {
		visited[cur] = true;
		for (Integer v : con[cur]) {
			if (!visited[v]) {
				dfs(v);
			}
		}
	}

	public void bfs(int cur) {
		Queue<Integer> q = new LinkedList<>();
		q.add(cur);
		visited[cur] = true;
		while (!q.isEmpty()) {
			cur = q.poll();
			for (Integer v : con[cur]) {
				if (!visited[v]) {
					visited[v] = true;
					q.add(v);
				}
			}
		}
	}
}

static class Reader {
	static BufferedReader br;
	static StringTokenizer st;
	private int charIdx = 0;
	private String s;

	public Reader() {
		this.br = new BufferedReader(new InputStreamReader(System.in));
	}

	public int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public double[] nd(int n) {
		double[] a = new double[n];
		for (int i = 0; i < n; i++)
			a[i] = nextDouble();
		return a;
	}

	public char nextChar() {
		if (s == null || charIdx >= s.length()) {
			if (st == null || !st.hasMoreTokens())
				try {
					readLine();
				} catch (Exception e) {
				}
			s = st.nextToken();
			charIdx = 0;
		}
		return s.charAt(charIdx++);
	}

	public long[] nl(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}

	public char[] nca() {
		return next().toCharArray();
	}

	public String[] nS(int n) {
		String[] a = new String[n];
		for (int i = 0; i < n; i++)
			a[i] = next();
		return a;
	}

	public int nextInt() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Integer.parseInt(st.nextToken());
	}

	public double nextDouble() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Double.parseDouble(st.nextToken());
	}

	public Long nextLong() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Long.parseLong(st.nextToken());
	}

	public String next() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return st.nextToken();
	}

	public static void readLine() {
		try {
			st = new StringTokenizer(br.readLine());
		} catch (Exception e) {
		}
	}
}

static class Sort {
	static Random random = new Random();
	public static void sortArray(int[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
	public static void sortArray(long[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
	public static void sortArray(String[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
	public static void sortArray(char[] s) {
        shuffle(s);
        Arrays.sort(s);
    }
    private static void shuffle(int[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            int t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
    private static void shuffle(long[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            long t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
    private static void shuffle(String[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            String t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
    private static void shuffle(char[] s) {
        for (int i = 0; i < s.length; ++i) {
            int j = random.nextInt(i + 1);
            char t = s[i];
            s[i] = s[j];
            s[j] = t;
        }
    }
}

static class Util{
	    static boolean isPrime(int n) {
	        if (n <= 1) return false;
	        if (n <= 3) return true;
	        if (n % 2 == 0 || n % 3 == 0) return false;
	        for (int i = 5; i * i <= n; i = i + 6)
	            if (n % i == 0 || n % (i + 2) == 0)
	            return false;
	        return true;
	    }
		public static int upperBound(long[] a, long v) {
			if(a[0]>v) return -1;
			int l=0,h=a.length-1;
			while(l<h) {
				int mid = (l+h)/2;
				if(v>=a[mid]) l = mid+1;
				else h = mid-1;
			}
			if(v<a[l]) return l-1;
			return l;
		}
		public static int lowerBound(long[] a, int v) {
			if(a[a.length-1]<v) return -1;
			int l=0,h=a.length-1;
			while(l<h) {
				int mid = (l+h)/2;
				if(v<=a[mid]) h = mid-1;
				else l = mid+1;
			}
			if(v>a[l]) return l+1;
			return l;
		}
	    public static boolean[] getSieve(int n) {
	        boolean[] isPrime = new boolean[n+1];
	        for (int i = 2; i <= n; i++) isPrime[i] = true;
	        for (int i = 2; i*i <= n; i++) if (isPrime[i])
	                for (int j = i; i*j <= n; j++) isPrime[i*j] = false;
	        return isPrime;
	    }
	    public static int gcd(int a, int b) {
	        if (a == 0)
	            return b;
	        return gcd(b%a, a);
	    }
		public static long modAdd(long a, long b, long mod) {
			return (a%mod+b%mod)%mod;
		}
		public static long modMul(long a, long b, long mod) {
			return ((a%mod)*(b%mod))%mod;
		}
		public static void dbg(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
	}

static class Writer {
	private PrintWriter pw;
	public Writer(){
		pw = new PrintWriter(System.out);
	}

	public void printArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void printArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void print(Object o) {
		pw.print(o.toString());
	}
	public void println(Object o) {
		pw.println(o.toString());
	}
	public void println() {
		pw.println();
	}
	public void flush() {
		pw.flush();
	}
	public void exit() {
		pw.close();
	}
}
}


import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Rough {
    static Scanner sc = new Scanner(System.in);
    static StringBuilder sb = new StringBuilder();
    static PrintWriter pw = new PrintWriter(System.out, true);
    public static void main(String[] args) {
        //code goes here
        char[] a = sc.next().toCharArray();
        char[] b = sc.next().toCharArray();
        int n = a.length, m = b.length;
        int bp = 0;
        for(char c : b)bp ^= c-'0';
        //System.out.println(bp);
        int ap = 0;
        int ct = 0;
        for(int i = 0;i < n;i++){
            ap ^= a[i]-'0';
            if(i >= m-1){
                if(ap == bp)ct++;

                ap ^= a[i-(m-1)]-'0';
            }
        }
        System.out.println(ct);
        pw.println(sb);
        pw.flush();
        pw.close();
    }
}


import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Rough {
    static Scanner sc = new Scanner(System.in);
    static StringBuilder sb = new StringBuilder();
    static PrintWriter pw = new PrintWriter(System.out, true);
    public static void main(String[] args) {
        //code goes here
        char arr[]=sc.next().toCharArray();
        char brr[]= sc.next().toCharArray();
        int n = arr.length,m = brr.length;
        int subs=1+n-m;
        int ind[]= new int[subs];
        int dif[] = new int[subs];
        for(int i =0;i<subs;i++){
            ind[i]=i;
        }
        for(int i =0;i<subs;i++) {
            for(int j =0;j<m;j++) {
                if(brr[j]!=arr[ind[i]]) {
                    dif[i]++;
                }
                ind[i]++;
            }
        }
        int cnt =0;
        for(int i :dif)
            if(i%2==0)
                cnt++;
        System.out.println(cnt);
        pw.println(sb);
        pw.flush();
        pw.close();
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author anand.oza
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CVusTheCossackAndStrings solver = new CVusTheCossackAndStrings();
        solver.solve(1, in, out);
        out.close();
    }

    static class CVusTheCossackAndStrings {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int[] a = in.readBitString();
            int[] b = in.readBitString();

            int B = 0;
            for (int x : b)
                B ^= x;

            int n = a.length;
            int k = b.length;
            for (int i = 1; i < n; i++) {
                a[i] = a[i] ^ a[i - 1];
            }

            int answer = 0;
            if ((a[k - 1] ^ B) == 0) {
                answer++;
            }
            for (int i = 0; i + k < n; i++) {
                if ((a[i + k] ^ a[i] ^ B) == 0)
                    answer++;
            }

            out.println(answer);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int[] readBitString() {
            char[] chars = next().toCharArray();
            int[] x = new int[chars.length];
            for (int i = 0; i < x.length; i++) {
                x[i] = chars[i] - '0';
            }
            return x;
        }

    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5;
int main(){
    int n; cin >> n;
    string s1 , s2; cin >> s1 >> s2;
    map<char,int> m1;
    map<char,int> m2;
    for(int i = 0; i < s1.size(); i++){
        m1[s1[i]] += 1;
        m2[s2[i]] += 1;
    }
    if(s1 == s2){
        cout << 0;
        return 0;
    }
    bool check = false;
    for(int i = 0 ; i  < s1.size(); i++){
        if(m1[s1[i]] == m2[s1[i]]) check = true;
        else{
            check = false;
            cout << -1;
            return 0;
        }
    }
    vector<char> v1;
    vector<char> v2;
    vector<int> v3;
    for(int i = 0; i < n; i++){
        v1.push_back(s1[i]);
        v2.push_back(s2[i]);
    }
    for(int i = 0; i < v2.size(); i++){
        for(int j = i; j < v1.size(); j++){
            if(v2[i] == v1[j]){
                while(i != j){
                    v3.push_back(j);
                    char w = v1[j - 1];
                    v1[j - 1] = v1[j];
                    v1[j] = w;
                    j--;
                }
            }
        }
    }
    cout << v3.size() << endl;
    for(int i = 0; i < v3.size(); i++){
        cout << v3[i] << " ";
    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5;
int main(){
    int n; cin >> n;
    string s1 , s2; cin >> s1 >> s2;
    map<char,int> m1;
    map<char,int> m2;
    for(int i = 0; i < s1.size(); i++){
        m1[s1[i]] += 1;
        m2[s2[i]] += 1;
    }
    if(s1 == s2){
        cout << 0;
        return 0;
    }
    bool check = false;
    for(int i = 0 ; i  < s1.size(); i++){
        if(m1[s1[i]] == m2[s1[i]]) check = true;
        else{
            check = false;
            cout << -1;
            return 0;
        }
    }
    vector<int> vi;
    int a[50000];
    int q = 0;
    for(int i = 0; i < s2.size(); i++){
        for(int j = i; j < s1.size(); j++){
            if(s2[i] == s1[j]){
                while(i != j){
                    a[q] = j;
                    q++;
                    char w = s1[j - 1];
                    s1[j - 1] = s1[j];
                    s1[j] = w;
                    j--;
                }
            }
        }
    }
    int cnt = 0;

    cout << q << endl;
    for(int i = 0; i < 50000; i++){
        if(a[i] != 0){
        cout << a[i] << " ";
        }
        else{
             return 0;
        }
    }

}