A robber has attempted to rob a bank but failed to complete his task. However, he had managed to open all the safes.

Oleg the bank client loves money (who doesn't), and decides to take advantage of this failed robbery and steal some money from the safes. There are many safes arranged in a line, where the i-th safe from the left is called safe i. There are n banknotes left in all the safes in total. The i-th banknote is in safe x_{i}. Oleg is now at safe a. There are two security guards, one of which guards the safe b such that b < a, i.e. the first guard is to the left of Oleg. The other guard guards the safe c so that c > a, i.e. he is to the right of Oleg.

The two guards are very lazy, so they do not move. In every second, Oleg can either take all the banknotes from the current safe or move to any of the neighboring safes. However, he cannot visit any safe that is guarded by security guards at any time, becaues he might be charged for stealing. Determine the maximum amount of banknotes Oleg can gather.


-----Input-----

The first line of input contains three space-separated integers, a, b and c (1 ≤ b < a < c ≤ 10^9), denoting the positions of Oleg, the first security guard and the second security guard, respectively.

The next line of input contains a single integer n (1 ≤ n ≤ 10^5), denoting the number of banknotes.

The next line of input contains n space-separated integers x_1, x_2, ..., x_{n} (1 ≤ x_{i} ≤ 10^9), denoting that the i-th banknote is located in the x_{i}-th safe. Note that x_{i} are not guaranteed to be distinct.


-----Output-----

Output a single integer: the maximum number of banknotes Oleg can take.


-----Examples-----
Input
5 3 7
8
4 7 5 5 3 6 2 8

Output
4

Input
6 5 7
5
1 5 7 92 3

Output
0



-----Note-----

In the first example Oleg can take the banknotes in positions 4, 5, 6 (note that there are 2 banknotes at position 5). Oleg can't take the banknotes in safes 7 and 8 because he can't run into the second security guard. Similarly, Oleg cannot take the banknotes at positions 3 and 2 because he can't run into the first security guard. Thus, he can take a maximum of 4 banknotes.

For the second sample, Oleg can't take any banknotes without bumping into any of the security guards.

Difficulty: competition

Starter code:

Solutions:
q, b, c = list(map(int, input().split()))
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
	if b < i < c:
		ans += 1
print(ans)


a, b, c = list(map(int, input().split(' ')))
n = int(input())
l = list(map(int, input().split(' ')))

res = 0
for x in l:
    if x > b and x < c:
       res += 1
print(res)


a, b, c = map(int,input().split())
n = int(input())
res = 0
for i in map(int,input().split()):
    res+= b<i<c
print(res)

a,b,c = map(int, input().split())
n = int(input())
s = [int(i) for i in input().split()]
ans = 0
for i in s:
    if i>b and i<c:
        ans+=1
print(ans)

a, b, c = list(map( int, input().split() ))
n = int( input() )
x = list( map( int, input().split() ) )
print( sum( b < v < c for v in x ) )


a,b,c = list(map(int, input().strip().split()))
n = int(input().strip())

cnt = 0
cifre = list(map(int, input().strip().split()))
for e in cifre:
    if b < e < c:
        cnt += 1
print(cnt)


a, b, c = list(map(int, input().split()))
n = int(input())
a = [int(s) for s in input().split()]

ans = 0
for i in range(n):
    if a[i] > b and a[i] < c:
        ans += 1

print(ans)


a,b,c = map(int, input().split())
n = int(input())
p = list(map(int, input().split()))
sm = 0
for i in range(len(p)):
    if p[i] > b and p[i] < c:
        sm += 1
print(sm)

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a, b, c = list(map(int, input().split()))
n = int(input())
banks = list(map(int, input().split()))
ans = 0
for bank in banks:
    if b < bank < c:
        ans += 1
print(ans)


a,b,c = map(int, input().split())
n = int(input())
m = map(int, input().split())
ans = len([i for i in m if i > b and i < c])
print(ans)

cur, att_first, att_second = map(int, input().split())


input()
l = list(map(int, input().split()))

moneys = 0
for x in l:
	if att_first < x < att_second:
		moneys += 1
print(moneys)

a, b, c = list(map(int, input().split(' ')))
n = int(input())
ans = 0
x = list(map(int, input().split(' ')))
for i in x:
    if i > b and i < c:
        ans += 1
print(ans)


a, b, c = list(map(int, input().split()))
n = int(input())
xs = list(map(int, input().split()))

cnt = 0
for x in xs:
    cnt += int(b < x and x < c)
print(cnt)


a, b, c = list(map(int, input().split()))
n = int(input())
x = list(map(int, input().split()))
ans = 0
for i in x:
    if b < i < c:
        ans += 1
print(ans)


a,b,c = list(map(int, input().split()))
n = int(input())
ans = 0
L = list(map(int, input().split()))
for i in L:
    if b < i < c:
        ans += 1
print(ans)


A, B, C = list(map(int, input().split()))
X = int(input())
print(sum(B < x < C for x in map(int, input().split())))


a, b, c = [int(x) for x in input().split()]
n = int(input())
banknotes = [int(x) for x in input().split()]
res = 0
for note in banknotes:
    if note > b and note < c:
        res += 1
print(res)

a, b, c = list(map(int, input().split()))
n = int(input())
xs = list(map(int, input().split()))
count = 0
for x in xs:
    if b < x < c:
        count += 1
print(count)


import sys

def main():
    a,b,c=list(map(int,sys.stdin.readline().split()))
    n=int(sys.stdin.readline().rstrip())
    x=list(map(int,sys.stdin.readline().split()))
    
    result=sum(1 for i in range(n) if b+1<=x[i]<=c-1)
    
    sys.stdout.write(str(result)+'\n')
    
main()



s=input()
s=s.split()
a=int(s[0])
b=int(s[1])
c=int(s[2])
n=int(input())
s=input()
s=s.split()
count=0
for i in range(n):
	if(int(s[i])>b and int(s[i])<c):
		count+=1
print(count)

#!/usr/bin/env python3
from sys import stdin, stdout

def rint():
    return list(map(int, stdin.readline().split()))
#lines = stdin.readlines()

a, b, c = rint()

n = int(input())
x = list(rint())

ans = 0
for i in x:
    if i > b and i < c:
        ans += 1

print(ans)


a, b, c = map(int, input().split())
n = int(input())
mass = list(map(int, input().split()))
mon = 0
for i in range(len(mass)):
    if b < mass[i] < c:
        mon += 1

print(mon)

[a,b,c] = list(map(int,input().split()))
n = int(input())
notes =  list(map(int,input().split()))
ans = 0
for i in notes:
    if i >b and i < c:
         ans+=1
print(ans)

z,x,y = map(int,input().split())
n=int(input())
tot=0
l=list(map(int,input().split()))
for i in l:
	if(i<y and i>x):
		tot+=1
print(tot)

def main():
    a, b, c = list(map(int, input().split()))
    n = int(input())
    money = list(map(int, input().split()))
    ans = 0
    for x in money:
        if b < x < c:
            ans += 1

    print(ans)


def __starting_point():
    main()

__starting_point()