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
// #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;

#define debug(...) fprintf(stderr, __VA_ARGS__)
#define int long long int
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
typedef pair<int, int> pii;
typedef long long ll;
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const ll INF = 1001001001001001LL;
const ll MOD = 1000000007LL;

// Rolling Hash
// Verified: AOJ 2444 (Substring)

struct RollingHash {
public:
    long long base_1, base_2, mod_1, mod_2;
    vector<long long> hash1, hash2, pow1, pow2;

    // init (constructor)
    RollingHash(string s) : base_1(1013), base_2(1007),
        mod_1(1000000007), mod_2(1000000009),
        hash1(s.length()+1,0), hash2(s.length()+1,0),
        pow1(s.length()+1,1), pow2(s.length()+1,1) {
            for(int i=0; i<s.length(); i++) {
                hash1[i+1] = (hash1[i]+s[i]) * base_1 % mod_1;
                hash2[i+1] = (hash2[i]+s[i]) * base_2 % mod_2;
                pow1[i+1] = pow1[i] * base_1 % mod_1;
                pow2[i+1] = pow2[i] * base_2 % mod_2;
            }
        }

    // calc str[l,r) hash (0-indexed)
    // if get(i1,j1) == get(i2,j2) -> identical string
    pair<long long, long long> get(int l, int r) {
        long long t1 = ((hash1[r] - hash1[l] * pow1[r-l]) % mod_1 + mod_1) % mod_1;
        long long t2 = ((hash2[r] - hash2[l] * pow2[r-l]) % mod_2 + mod_2) % mod_2;
        return make_pair(t1, t2);
    }
};

signed main() {
    string s, t; cin >> s >> t;
    int N = s.length(), M = t.length();
    RollingHash rs(s), rt(t);

    int ans = 0;
    for(int i=0; i<N-M+1; i++) {
        int x; // 先頭何文字一致しているか？
        {
            int ub = M+1, lb = 0;
            while(ub - lb > 1) {
                int mid = (ub + lb) / 2;
                int isl = i, isr = i + mid;
                int itl = 0, itr = mid;
                if(rs.get(isl, isr) == rt.get(itl, itr)) {
                    lb = mid;
                }
                else {
                    ub = mid;
                }
            }
            x = lb;
        }
        if(x == M) continue;
        
        {
            // x 文字一致、残り M - x - 1 文字について調べたい
            int ub = M - x, lb = 0;
            while(ub - lb > 1) {
                int mid = (ub + lb) / 2;
                int isl = i + x + 1, isr = i + x + 1 + mid;
                int itl = x + 1, itr = x + 1 + mid;
                if(rs.get(isl, isr) == rt.get(itl, itr)) {
                    lb = mid;
                }
                else {
                    ub = mid;
                }
            }

            if(lb == M - x - 1) ans++;
        }
    }
    cout << ans << endl;
    return 0;
}

