import itertools as it



num = int(eval(input()))



item_number = num//100



if item_number>= 20:

    item_number = 20



res_list = []

candi_list = list(it.combinations_with_replacement([100, 101, 102, 103, 104, 105], item_number))

candi_ans_list = [sum(item) for item in candi_list]



if num >= 2000:

    print((1))

else:



    if num in candi_ans_list:

        print((1))

    else:

        print((0))

import itertools as it



num = int(eval(input()))



item_number = num//100

temp_val = num%100



times = temp_val //15

temp_val = temp_val % 15



if temp_val <= 5:

    temp_val = 1

elif temp_val <= 10:

    temp_val = 2

else:

    temp_val =3



need_item_number = 3*times + temp_val



# print(item_number)

# print(times)

# print(need_item_number)



if item_number >= need_item_number:

    print((1))

else:

    print((0))
import itertools as it

num = int(eval(input()))
item_number = num // 100
if item_number >= 20:
    item_number = 20
res_list = []
candi_list = list(
    it.combinations_with_replacement([100, 101, 102, 103, 104, 105], item_number)
)
candi_ans_list = [sum(item) for item in candi_list]
if num >= 2000:
    print((1))
else:
    if num in candi_ans_list:
        print((1))
    else:
        print((0))

import itertools as it

num = int(eval(input()))
item_number = num // 100
temp_val = num % 100
times = temp_val // 15
temp_val = temp_val % 15
if temp_val <= 5:
    temp_val = 1
elif temp_val <= 10:
    temp_val = 2
else:
    temp_val = 3
need_item_number = 3 * times + temp_val
# print(item_number)
# print(times)
# print(need_item_number)
if item_number >= need_item_number:
    print((1))
else:
    print((0))

-if item_number >= 20: -    item_number = 20 -res_list = [] -candi_list = list( -    it.combinations_with_replacement([100, 101, 102, 103, 104, 105], item_number) -) -candi_ans_list = [sum(item) for item in candi_list] -if num >= 2000: +temp_val = num % 100 +times = temp_val // 15 +temp_val = temp_val % 15 +if temp_val <= 5: +    temp_val = 1 +elif temp_val <= 10: +    temp_val = 2 +else: +    temp_val = 3 +need_item_number = 3 * times + temp_val +# print(item_number) +# print(times) +# print(need_item_number) +if item_number >= need_item_number: -    if num in candi_ans_list: -        print((1)) -    else: -        print((0)) +    print((0))