The unlucky Ikta-kun has rewritten the important character string T that he had to a different character string T'by the virus. It is known that the virus has rewritten one letter of T to a different letter. That is, T and T'are different by exactly one character. In order to restore T, Ikta prepared a document S in which T appears. As a preparation for restoring T, I would like to find out the number of substrings of S that may match T.

Given the string T'and the document S. S = a1 a2 a3 .. .a | S | length | T'| substring ak ak + 1 ... ak + | T'| −1 (1 ≤ k ≤ | S | − | T'| Find the number of things that differ by one character from T'in +1).



Input

The input is given in the following format.


S
T'


* S is given in the first line.
* T'is given in the second line.
* S and T'consist only of uppercase and lowercase alphabets, respectively.



Constraints

Each variable being input satisfies the following constraints.

* 1 ≤ | S | ≤ 300,000
* 1 ≤ | T'| ≤ | S |

Output

Output the number of substrings that satisfy the conditions on one line.

Examples

Input

abcbcdbc
abc


Output

2


Input

aaaaaa
aaaaaa


Output

0


Input

baaaaaaaa
b


Output

8
#include<bits/stdc++.h>

// Shrotening
#define fst first
#define snd second
#define pb push_back
#define mp std::make_pair

// Loop
#define FOR(i,a,b) for(auto i=(a);i<(b);++i)
#define RFOR(i,a,b) for(auto i=(a);i>=(b);--i)

#define REP(i,a) for(long i=0;i<(a);++i)
#define RREP(i,a) for(long i=(a);i>=0;--i)

#define EACH(i,a) for(auto (i)=(a).begin(),_END=(a).end();i!=_END;++i)
#define REACH(i,a) for(auto (i)=(a).rbegin(),_END=(a).rend();i!=_END;++i)

//Algorithm
#define ALL(a) (a).begin(), a.end()
#define RALL(a) (a).rbegin(), a.rend()
#define EXIST(a,x) ((a).find(x)!=(a).end())
#define SORT(a) std::sort((a).begin(), (a).end())
#define UNIQUE(a) std::sort((a).begin(), a.end()), a.erase(std::unique((a).begin(), a.end()), a.end());
#define SUM(a) std::accumulate((a).begin(), (a).end(), 0);

#define fcout(n) std::cout << std::fixed << std::setprecision((n))

//Setting
#define OPT std::cin.tie(0);std::ios::sync_with_stdio(false);

//debug message
bool debug = true;
#define MSG(s)   if(debug){std::cout << s << std::endl;}
#define DEBUG(x) if(debug){std::cout << "debug(" << #x << "): " << x << std::endl;}

//alias
typedef long long LL;
typedef std::pair<int,int> PII;

typedef std::vector<char> VC;
typedef std::vector<int>  VI;
typedef std::vector<long> VL;
typedef std::vector<long long> VLL;
typedef std::vector<PII> VPII;

typedef std::vector< VC > VC2;
typedef std::vector< VI > VI2;
typedef std::vector< VL > VL2;
typedef std::vector< VLL > VLL2;

struct RollingHash {
    typedef long long LL;
    typedef std::pair<long long, long long> hash_type;
    private:
        LL base1, base2;
        LL mod1, mod2;
        std::vector<LL> hash1, hash2;
        std::vector<LL> pow1, pow2;
    public:
        RollingHash(): base1(1009), base2(1013), mod1(1000000007), mod2(1000000009) {}

        void init(const std::string& s) {
            int N = s.size();

            hash1.assign(N+1, 0);
            hash2.assign(N+1, 0);
            pow1.assign(N+1, 1);
            pow2.assign(N+1, 1);

            for(int i=0; i<N; ++i) {
                hash1[i+1] = (hash1[i] + s[i]) * base1 % mod1;
                hash2[i+1] = (hash2[i] + s[i]) * base2 % mod2;
                pow1[i+1] = pow1[i] * base1 % mod1;
                pow2[i+1] = pow2[i] * base2 % mod2;
            }
        }

        inline LL get_hash1(int l, int r) {
            return ( (hash1[r] - hash1[l]*pow1[r-l]) % mod1 + mod1) % mod1;
        }

        inline LL get_hash2(int l, int r) {
            return ( (hash2[r] - hash2[l]*pow2[r-l]) % mod2 + mod2) % mod2;
        }

        hash_type get_hash_pair(int l, int r) {
            return std::make_pair(get_hash1(l, r), get_hash2(l, r));
        }
};

std::string S, T;
int lenS, lenT;
RollingHash rhS, rhT;

bool isOk(const int L, const int R) {
    int l1, r1, l2, r2;
    //left-side
    int left = 0, right = lenT - 1;
    while(right-left > 1) {
        int mid = (left + right) / 2;
        auto hashS = rhS.get_hash_pair(L, L+mid+1);
        auto hashT = rhT.get_hash_pair(0, mid+1);
        if(hashS == hashT) {
            left = mid;
        } else {
            right = mid;
        }
    }
    l1 = left, r1 = right;
    left = 0, right = lenT - 1;
    while(right - left > 1) {
        int mid = (left + right) / 2;
        auto hashS = rhS.get_hash_pair(L + mid, L + lenT);
        auto hashT = rhT.get_hash_pair(mid, lenT);
        if(hashS == hashT) {
            right = mid;
        } else {
            left = mid;
        }
    }

    l2 = left, r2 = right;
    if(S[L+l1] != T[l1]) {
        --l1;
    }
    if(S[L+r2] != T[r2]) {
        ++r2;
    }

    //std::cout << "1:" << S.substr(L, R-L+1) << "," << T << ":" << l1 << "," << r1 << std::endl;
    //std::cout << "2:" << S.substr(L, R-L+1) << "," << T << ":" << l2 << "," << r2 << std::endl;
    return (l1 + 2) == r2;
}


int main() {
    std::cin >> S;
    std::cin >> T;

    lenS = S.length(), lenT = T.length();
    if(S == T) {
        std::cout << "0" << std::endl;
        return 0;
    } else if(lenT == 1) {
        int cnt = 0;
        for(auto c: S) {
            if(c != T[0]) ++cnt;
        }
        std::cout << cnt << std::endl;
        return 0;
    }

    rhS = RollingHash(), rhT = RollingHash();
    rhS.init(S);
    rhT.init(T);


    /*
    for(int i=0; i<lenS-lenT+1; ++i) {
        std::cout << S.substr(i, lenT) << "," << T << ":" << rhS.get_hash1(i, i+lenT) << "," << rhT.get_hash1(0, lenT) << std::endl;
    }
    */

   int i, j;
   int ans = 0;
   for(i=0; i<lenS-lenT+1; ++i) {
       ans += isOk(i, i+lenT-1);
   }
   std::cout << ans << std::endl;
}
