Giga Tower is the tallest and deepest building in Cyberland. There are 17 777 777 777 floors, numbered from  - 8 888 888 888 to 8 888 888 888. In particular, there is floor 0 between floor  - 1 and floor 1. Every day, thousands of tourists come to this place to enjoy the wonderful view. 

In Cyberland, it is believed that the number "8" is a lucky number (that's why Giga Tower has 8 888 888 888 floors above the ground), and, an integer is lucky, if and only if its decimal notation contains at least one digit "8". For example, 8,  - 180, 808 are all lucky while 42,  - 10 are not. In the Giga Tower, if you write code at a floor with lucky floor number, good luck will always be with you (Well, this round is #278, also lucky, huh?).

Tourist Henry goes to the tower to seek good luck. Now he is at the floor numbered a. He wants to find the minimum positive integer b, such that, if he walks b floors higher, he will arrive at a floor with a lucky number. 


-----Input-----

The only line of input contains an integer a ( - 10^9 ≤ a ≤ 10^9).


-----Output-----

Print the minimum b in a line.


-----Examples-----
Input
179

Output
1

Input
-1

Output
9

Input
18

Output
10



-----Note-----

For the first sample, he has to arrive at the floor numbered 180.

For the second sample, he will arrive at 8.

Note that b should be positive, so the answer for the third sample is 10, not 0.

Difficulty: interview

Starter code:

Solutions:
a = int(input())
for i in range(a+1, a+47):
    if ('8' in str(i)):
        print(i-a)
        break



a = int(input())
res = 1
a += 1
while '8' not in str(a):
	res += 1
	a += 1
print(res)

x = int(input())
count = 0
while "8" not in str(x) or count == 0:

    x += 1
    count += 1

print(count)


n = int(input())
for i in range(n + 1, 1000000000000):
    s = str(i)
    if s.count('8') != 0:
        print(i - n)
        return


x = int(input())
b=1
while not "8" in str(x+b):
	b += 1
print(b)


n = int(input())
m=n
n+=1
while '8' not in str(n):
    n+=1
print(n-m)

n = int(input())
ans = 0
def check(k):
    nonlocal n
    if k == n: return False
    k = str(k)
    for i in k:
        if i == '8': return True
    return False
a = n
while not check(a):
    a += 1
    ans += 1
print(ans)


a = int(input())
b = 0
flag = False
while True:
    a += 1
    b += 1
    for i in range(len(str(a))):
        if str(a)[i] == '8':
            flag = True
    if flag: break
print(b)

a = int(input())
a += 1
c = 1
while not '8' in str(a):
    a += 1
    c += 1
print(c)

s = input()
ans = 0
f = True
while f:
    s = str(int(s)+1)
    ans+=1
    for i in s:
        if i == '8':
            f = False
print(ans)
            


#!/usr/bin/env python

cur = int(input()) + 1
steps = 1

while not '8' in str(cur):
    cur += 1
    steps += 1

print(steps)


x = int(input())
cont = 1
x += 1
while not '8' in str(x):
    x += 1
    cont += 1

print (cont)


x = int(input()) + 1
c = 1


def has_eight(x):
    return '8' in str(x)

while not has_eight(x):
    x += 1
    c += 1

print(c)

a = int(input())
i = 1
a += 1
while a < 8888888888 and not('8' in str(a)):
    a += 1
    i += 1
print(i)

def f(a):
	flag = False
	for i in str(a):
		if (i == "8"):
			flag = True
	return flag


a = int(input())
# a = 18
d = 1
while not f(a + d): #and not f(a - d):
	d += 1
print(d)


import sys
for line in sys.stdin.readlines() :
    num = int(line.strip())
    for i in range(1,8888888889-num) : 
        if str(num+i).count('8') : 
            print(i)
            break
    break


def f(x):
    if (x.count("8")):
        return True
    return False

a = int(input());

c = 1;
a += 1;

a = str(a)

while not f(a):
    a = str(int(a) + 1);
    c += 1;
    
print(c)

a = int(input())
b = a + 1
while str(b).count('8') == 0:
    b += 1
print(b - a)


n=int (input())
cnt=1
n+=1
while (1):
    sn=str(n)
    f=0
    for i in sn:
        if (i=='8'):
            f=1
    if (f==1):
        print(cnt)
        break
    n+=1
    cnt+=1


'''
Created on 21-Nov-2014

@author: akash
'''
num = int(input())
j = 1
for i in range(1, 20):
    res = str(num + i)
    if res.find("8") != -1:
        j = i
        break
print(j)


a = int(input())
b = 0
while True:
    a += 1
    b += 1
    if '8' in str(a):
        break
print(b)


a = int(input())

b = 0
while '8' not in str(a) or b == 0:
    a += 1
    b += 1

print(b)

a = int(input())
c = 0
for i in range(a + 1,  8888888889):
    c += 1
    if '8' in str(i):
        print(c)
        break

3
n = int(input())
c = 1
n += 1
while str(n).find('8') == -1:
    c += 1
    n += 1
print(c)


n = int(input())
n += 1
s = str(n)
flag = False
su =1
while flag == False:
    for char in s:
        if char == '8':
            print(su)
            return
    n += 1
    s = str(n)
    su+=1