import hashlib

def hashf(st, nonce):
    h = hashlib.sha256()
    st += str(nonce)
    h.update(st.encode('utf-8'))
    return h.hexdigest()

target = 0x0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
maxnonce = 2 ** 32
s = input()

for i in range(maxnonce):
    if int(hashf(s,i),16) <= target:
        print(i)
        # print(hashf(s,i))
        break   



4e08a7184c230cf9b8cfa405e033a4610ed66059
<mask token>


def hashf(st, nonce):
    h = hashlib.sha256()
    st += str(nonce)
    h.update(st.encode('utf-8'))
    return h.hexdigest()


<mask token>

<mask token>


def hashf(st, nonce):
    h = hashlib.sha256()
    st += str(nonce)
    h.update(st.encode('utf-8'))
    return h.hexdigest()


<mask token>
for i in range(maxnonce):
    if int(hashf(s, i), 16) <= target:
        print(i)
        break

<mask token>


def hashf(st, nonce):
    h = hashlib.sha256()
    st += str(nonce)
    h.update(st.encode('utf-8'))
    return h.hexdigest()


target = (
    1766847064778384329583297500742918515827483896875618958121606201292619775)
maxnonce = 2 ** 32
s = input()
for i in range(maxnonce):
    if int(hashf(s, i), 16) <= target:
        print(i)
        break

import hashlib


def hashf(st, nonce):
    h = hashlib.sha256()
    st += str(nonce)
    h.update(st.encode('utf-8'))
    return h.hexdigest()


target = (
    1766847064778384329583297500742918515827483896875618958121606201292619775)
maxnonce = 2 ** 32
s = input()
for i in range(maxnonce):
    if int(hashf(s, i), 16) <= target:
        print(i)
        break

import hashlib

def hashf(st, nonce):
    h = hashlib.sha256()
    st += str(nonce)
    h.update(st.encode('utf-8'))
    return h.hexdigest()

target = 0x0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
maxnonce = 2 ** 32
s = input()

for i in range(maxnonce):
    if int(hashf(s,i),16) <= target:
        print(i)
        # print(hashf(s,i))
        break   


