import collections

import itertools as it

import math

import numpy as np



# A = input()

# A = int(input())

# A = map(int, input().split())

# A = list(map(int, input().split()))

# A = [int(input()) for i in range(N)]

#

# c = collections.Counter()



X = int(eval(input()))

nshohin = X // 100

amari = X % 100



print((0 if nshohin * 5 < amari else 1))
#!/usr/bin/env python3

import collections

import itertools as it

import math

#import numpy as np

 

#  = input()

x  = int(eval(input()))

#  = map(int, input().split())

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

#  = [int(input()) for i in range(N)]

#

# c = collections.Counter()



n = x // 100

mod = x % 100

print((0 if 5 * n < mod else 1))



import collections
import itertools as it
import math
import numpy as np

# A = input()
# A = int(input())
# A = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()
X = int(eval(input()))
nshohin = X // 100
amari = X % 100
print((0 if nshohin * 5 < amari else 1))

#!/usr/bin/env python3
import collections
import itertools as it
import math

# import numpy as np
#  = input()
x = int(eval(input()))
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()
n = x // 100
mod = x % 100
print((0 if 5 * n < mod else 1))

+#!/usr/bin/env python3 -import numpy as np -# A = input() -# A = int(input()) -# A = map(int, input().split()) -# A = list(map(int, input().split())) -# A = [int(input()) for i in range(N)] +# import numpy as np +#  = input() +x = int(eval(input())) +#  = map(int, input().split()) +#  = list(map(int, input().split())) +#  = [int(input()) for i in range(N)] -X = int(eval(input())) -nshohin = X // 100 -amari = X % 100 -print((0 if nshohin * 5 < amari else 1)) +n = x // 100 +mod = x % 100 +print((0 if 5 * n < mod else 1))