

# import numpy as np

# import numpypy as np

import sys

input = sys.stdin.readline



def eprint(*args, **kwargs):

    print(*args, file=sys.stderr, **kwargs)

    return



import math

import string

import fractions

from fractions import Fraction

from fractions import gcd



def lcm(n,m):

    return int(n*m/gcd(n,m))



import re

import array

import copy

import functools

import operator



import collections

import itertools

import bisect

import heapq





from heapq import heappush

from heapq import heappop

from heapq import heappushpop

from heapq import heapify

from heapq import heapreplace



from queue import PriorityQueue as pq



def reduce(p, q):

    common = fractions.gcd(p, q)

    return (p//common , q//common )

# from itertools import accumulate

# from collections import deque



import random

import traceback



def main():

    x = int(input().strip())

    x_left=x%100                # x_leftはxの二桁目以下(0<=x_left<=99)

    x_d3above=x//100            # x_leftはxの三桁目以上(0<=x_d3above<=10^3)



    x_d1 = x_left % 10              # Xの一桁目

    x_d2 = x_left //10              # Xの二桁目



    sideEffect=0

    if x_d1==1:

        sideEffect+=100

    elif x_d1==2:

        sideEffect+=100

    elif x_d1==3:

        sideEffect+=100

    elif x_d1==4:

        sideEffect+=100

    elif x_d1==5:

        sideEffect+=100

    elif x_d1==6:

        sideEffect+=200

    elif x_d1==7:

        sideEffect+=200

    elif x_d1==8:

        sideEffect+=200

    elif x_d1==9:

        sideEffect+=200

    elif x_d1==0:

        pass

    else:

        eprint(x_d1)

        try:

            raise Exception

        except:

            traceback.print_exc("error!")



    if x_d2==1:

        sideEffect+=200

    elif x_d2==2:

        sideEffect+=400

    elif x_d2==3:

        sideEffect+=600

    elif x_d2==4:

        sideEffect+=800

    elif x_d2==5:

        sideEffect+=1000

    elif x_d2==6:

        sideEffect+=1200

    elif x_d2==7:

        sideEffect+=1400

    elif x_d2==8:

        sideEffect+=1600

    elif x_d2==9:

        sideEffect+=1800

    elif x_d2==0:

        pass

    else:

        eprint(x_d2)

        try:

            raise Exception

        except:

            traceback.print_exc()



    if (x//100)*100 < sideEffect:

        print(0)

    else:

        print(1)

        

    

    return



if __name__ == '__main__':

    main()





import sys

input = sys.stdin.readline



def eprint(*args, **kwargs):

    print(*args, file=sys.stderr, **kwargs)

    return



# import math

# import string

# import fractions

# from fractions import Fraction

# from fractions import gcd



# def lcm(n,m):

#     return int(n*m/gcd(n,m))



# import re

# import array

# import copy

# import functools

# import operator



# import collections

# import itertools

# import bisect

# import heapq





# from heapq import heappush

# from heapq import heappop

# from heapq import heappushpop

# from heapq import heapify

# from heapq import heapreplace



# from queue import PriorityQueue as pq



# def reduce(p, q):

#     common = fractions.gcd(p, q)

#     return (p//common , q//common )

# # from itertools import accumulate

# # from collections import deque



# from operator import mul

# from functools import reduce



# def combinations_count(n, r):

#     r = min(r, n - r)

#     numer = reduce(mul, range(n, n - r, -1), 1)

#     denom = reduce(mul, range(1, r + 1), 1)

#     return numer // denom



# import random



def main():

    x = int(input().strip())

    d10 = x%100

    

    a=0

    b=0

    c=0

    d=0

    e=0

    

    f = d10//5

    

    if d10%5==0:

        pass

    elif d10%5==1:

        b=1

    elif d10%5==2:

        c=1

    elif d10%5==3:

        d=1

    elif d10%5==4:

        e=1

    else:

        try:

            raise ValueError("error!")

        except ValueError as e:

            eprint(e)



    if (b+c+d+e+f)*100<=x:

        print(1)

    else:

        print(0)

    return



if __name__ == '__main__':

    main()





'''

for given X (1<=X<=10**5).

exits (a,b,c,d,e,f \in [0...10**6]).

100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X







100*(a+b+c+d+e+f) + (b + 2*c + 3*d + 4*e + 5*f) == X

(b + 2*c + 3*d + 4*e + 5*f) == X - 100*(a+b+c+d+e+f)



Xの下二桁をみると，

(b + 2*c + 3*d + 4*e + 5*f) % 100 =  (Xの下二桁) ---(1)

かつ

X >= 



100*(a+b+c+d+e+f) 

が成立．





このとき

(1)を満たす中で

b+c+d+e+fが最小の場合を考えると

let d0 and  d1 (0 <= d0,d1 <= 9) such that

	10*d1 + 1*d0  = (Xの下二桁)



(10*d1 + 1*d0) // 5 -> f

(10*d1 + 1*d0) % 5 -> 

(if 1 then b else b ->0

 if 2 then c else c ->0

 if 3 then d else d ->0

 if 4 then e else e ->0

)

の場合であることが分かる．(後述)

このとき

Xが小さすぎなければ，

乃ち

100*(b+c+d+e+f) <= X 

のとき，乃ち

  ( (100*(b+c+d+e+f) <= X) and ((b + 2*c + 3*d + 4*e + 5*f) % 100 == (Xの下二桁)) )



such that 

 (但し b,c,d,e は

  (10*d1 + 1*d0) // 5 -> f

  (10*d1 + 1*d0) % 5 -> 

  (if 1 then b else b ->0

   if 2 then c else c ->0

   if 3 then d else d ->0

   if 4 then e else e ->0

  )

 )



のとき，

for given X (1<=X<=10**5).

exits (a,b,c,d,e,f \in [0...10**6]).

100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X

は必ず成立する



'''

# import numpy as np
# import numpypy as np
import sys

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


import math
import string
import fractions
from fractions import Fraction
from fractions import gcd


def lcm(n, m):
    return int(n * m / gcd(n, m))


import re
import array
import copy
import functools
import operator
import collections
import itertools
import bisect
import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq


def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


# from itertools import accumulate
# from collections import deque
import random
import traceback


def main():
    x = int(input().strip())
    x_left = x % 100  # x_leftはxの二桁目以下(0<=x_left<=99)
    x_d3above = x // 100  # x_leftはxの三桁目以上(0<=x_d3above<=10^3)
    x_d1 = x_left % 10  # Xの一桁目
    x_d2 = x_left // 10  # Xの二桁目
    sideEffect = 0
    if x_d1 == 1:
        sideEffect += 100
    elif x_d1 == 2:
        sideEffect += 100
    elif x_d1 == 3:
        sideEffect += 100
    elif x_d1 == 4:
        sideEffect += 100
    elif x_d1 == 5:
        sideEffect += 100
    elif x_d1 == 6:
        sideEffect += 200
    elif x_d1 == 7:
        sideEffect += 200
    elif x_d1 == 8:
        sideEffect += 200
    elif x_d1 == 9:
        sideEffect += 200
    elif x_d1 == 0:
        pass
    else:
        eprint(x_d1)
        try:
            raise Exception
        except:
            traceback.print_exc("error!")
    if x_d2 == 1:
        sideEffect += 200
    elif x_d2 == 2:
        sideEffect += 400
    elif x_d2 == 3:
        sideEffect += 600
    elif x_d2 == 4:
        sideEffect += 800
    elif x_d2 == 5:
        sideEffect += 1000
    elif x_d2 == 6:
        sideEffect += 1200
    elif x_d2 == 7:
        sideEffect += 1400
    elif x_d2 == 8:
        sideEffect += 1600
    elif x_d2 == 9:
        sideEffect += 1800
    elif x_d2 == 0:
        pass
    else:
        eprint(x_d2)
        try:
            raise Exception
        except:
            traceback.print_exc()
    if (x // 100) * 100 < sideEffect:
        print(0)
    else:
        print(1)
    return


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


# import math
# import string
# import fractions
# from fractions import Fraction
# from fractions import gcd
# def lcm(n,m):
#     return int(n*m/gcd(n,m))
# import re
# import array
# import copy
# import functools
# import operator
# import collections
# import itertools
# import bisect
# import heapq
# from heapq import heappush
# from heapq import heappop
# from heapq import heappushpop
# from heapq import heapify
# from heapq import heapreplace
# from queue import PriorityQueue as pq
# def reduce(p, q):
#     common = fractions.gcd(p, q)
#     return (p//common , q//common )
# # from itertools import accumulate
# # from collections import deque
# from operator import mul
# from functools import reduce
# def combinations_count(n, r):
#     r = min(r, n - r)
#     numer = reduce(mul, range(n, n - r, -1), 1)
#     denom = reduce(mul, range(1, r + 1), 1)
#     return numer // denom
# import random
def main():
    x = int(input().strip())
    d10 = x % 100
    a = 0
    b = 0
    c = 0
    d = 0
    e = 0
    f = d10 // 5
    if d10 % 5 == 0:
        pass
    elif d10 % 5 == 1:
        b = 1
    elif d10 % 5 == 2:
        c = 1
    elif d10 % 5 == 3:
        d = 1
    elif d10 % 5 == 4:
        e = 1
    else:
        try:
            raise ValueError("error!")
        except ValueError as e:
            eprint(e)
    if (b + c + d + e + f) * 100 <= x:
        print(1)
    else:
        print(0)
    return


if __name__ == "__main__":
    main()
"""
for given X (1<=X<=10**5).
exits (a,b,c,d,e,f \in [0...10**6]).
100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X
100*(a+b+c+d+e+f) + (b + 2*c + 3*d + 4*e + 5*f) == X
(b + 2*c + 3*d + 4*e + 5*f) == X - 100*(a+b+c+d+e+f)
Xの下二桁をみると，
(b + 2*c + 3*d + 4*e + 5*f) % 100 =  (Xの下二桁) ---(1)
かつ
X >= 
100*(a+b+c+d+e+f) 
が成立．
このとき
(1)を満たす中で
b+c+d+e+fが最小の場合を考えると
let d0 and  d1 (0 <= d0,d1 <= 9) such that
	10*d1 + 1*d0  = (Xの下二桁)
(10*d1 + 1*d0) // 5 -> f
(10*d1 + 1*d0) % 5 -> 
(if 1 then b else b ->0
 if 2 then c else c ->0
 if 3 then d else d ->0
 if 4 then e else e ->0
)
の場合であることが分かる．(後述)
このとき
Xが小さすぎなければ，
乃ち
100*(b+c+d+e+f) <= X 
のとき，乃ち
  ( (100*(b+c+d+e+f) <= X) and ((b + 2*c + 3*d + 4*e + 5*f) % 100 == (Xの下二桁)) )
such that 
 (但し b,c,d,e は
  (10*d1 + 1*d0) // 5 -> f
  (10*d1 + 1*d0) % 5 -> 
  (if 1 then b else b ->0
   if 2 then c else c ->0
   if 3 then d else d ->0
   if 4 then e else e ->0
  )
 )
のとき，
for given X (1<=X<=10**5).
exits (a,b,c,d,e,f \in [0...10**6]).
100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X
は必ず成立する
"""

-# import numpy as np -# import numpypy as np -import math -import string -import fractions -from fractions import Fraction -from fractions import gcd - - -def lcm(n, m): -    return int(n * m / gcd(n, m)) - - -import re -import array -import copy -import functools -import operator -import collections -import itertools -import bisect -import heapq -from heapq import heappush -from heapq import heappop -from heapq import heappushpop -from heapq import heapify -from heapq import heapreplace -from queue import PriorityQueue as pq - - -def reduce(p, q): -    common = fractions.gcd(p, q) -    return (p // common, q // common) - - -# from itertools import accumulate -# from collections import deque -import random -import traceback - - +# import math +# import string +# import fractions +# from fractions import Fraction +# from fractions import gcd +# def lcm(n,m): +#     return int(n*m/gcd(n,m)) +# import re +# import array +# import copy +# import functools +# import operator +# import collections +# import itertools +# import bisect +# import heapq +# from heapq import heappush +# from heapq import heappop +# from heapq import heappushpop +# from heapq import heapify +# from heapq import heapreplace +# from queue import PriorityQueue as pq +# def reduce(p, q): +#     common = fractions.gcd(p, q) +#     return (p//common , q//common ) +# # from itertools import accumulate +# # from collections import deque +# from operator import mul +# from functools import reduce +# def combinations_count(n, r): +#     r = min(r, n - r) +#     numer = reduce(mul, range(n, n - r, -1), 1) +#     denom = reduce(mul, range(1, r + 1), 1) +#     return numer // denom +# import random -    x_left = x % 100  # x_leftはxの二桁目以下(0<=x_left<=99) -    x_d3above = x // 100  # x_leftはxの三桁目以上(0<=x_d3above<=10^3) -    x_d1 = x_left % 10  # Xの一桁目 -    x_d2 = x_left // 10  # Xの二桁目 -    sideEffect = 0 -    if x_d1 == 1: -        sideEffect += 100 -    elif x_d1 == 2: -        sideEffect += 100 -    elif x_d1 == 3: -        sideEffect += 100 -    elif x_d1 == 4: -        sideEffect += 100 -    elif x_d1 == 5: -        sideEffect += 100 -    elif x_d1 == 6: -        sideEffect += 200 -    elif x_d1 == 7: -        sideEffect += 200 -    elif x_d1 == 8: -        sideEffect += 200 -    elif x_d1 == 9: -        sideEffect += 200 -    elif x_d1 == 0: +    d10 = x % 100 +    a = 0 +    b = 0 +    c = 0 +    d = 0 +    e = 0 +    f = d10 // 5 +    if d10 % 5 == 0: +    elif d10 % 5 == 1: +        b = 1 +    elif d10 % 5 == 2: +        c = 1 +    elif d10 % 5 == 3: +        d = 1 +    elif d10 % 5 == 4: +        e = 1 -        eprint(x_d1) -            raise Exception -        except: -            traceback.print_exc("error!") -    if x_d2 == 1: -        sideEffect += 200 -    elif x_d2 == 2: -        sideEffect += 400 -    elif x_d2 == 3: -        sideEffect += 600 -    elif x_d2 == 4: -        sideEffect += 800 -    elif x_d2 == 5: -        sideEffect += 1000 -    elif x_d2 == 6: -        sideEffect += 1200 -    elif x_d2 == 7: -        sideEffect += 1400 -    elif x_d2 == 8: -        sideEffect += 1600 -    elif x_d2 == 9: -        sideEffect += 1800 -    elif x_d2 == 0: -        pass +            raise ValueError("error!") +        except ValueError as e: +            eprint(e) +    if (b + c + d + e + f) * 100 <= x: +        print(1) -        eprint(x_d2) -        try: -            raise Exception -        except: -            traceback.print_exc() -    if (x // 100) * 100 < sideEffect: -    else: -        print(1) +""" +for given X (1<=X<=10**5). +exits (a,b,c,d,e,f \in [0...10**6]). +100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X +100*(a+b+c+d+e+f) + (b + 2*c + 3*d + 4*e + 5*f) == X +(b + 2*c + 3*d + 4*e + 5*f) == X - 100*(a+b+c+d+e+f) +Xの下二桁をみると， +かつ +X >= +100*(a+b+c+d+e+f) +が成立． +このとき +(1)を満たす中で +b+c+d+e+fが最小の場合を考えると +let d0 and  d1 (0 <= d0,d1 <= 9) such that +	10*d1 + 1*d0  = (Xの下二桁) +(10*d1 + 1*d0) // 5 -> f +(10*d1 + 1*d0) % 5 -> +(if 1 then b else b ->0 + if 2 then c else c ->0 + if 3 then d else d ->0 + if 4 then e else e ->0 +) +の場合であることが分かる．(後述) +このとき +Xが小さすぎなければ， +乃ち +100*(b+c+d+e+f) <= X +のとき，乃ち +  ( (100*(b+c+d+e+f) <= X) and ((b + 2*c + 3*d + 4*e + 5*f) % 100 == (Xの下二桁)) ) +such that + (但し b,c,d,e は +  (10*d1 + 1*d0) // 5 -> f +  (10*d1 + 1*d0) % 5 -> +  (if 1 then b else b ->0 +   if 2 then c else c ->0 +   if 3 then d else d ->0 +   if 4 then e else e ->0 +  ) + ) +のとき， +for given X (1<=X<=10**5). +exits (a,b,c,d,e,f \in [0...10**6]). +100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X +は必ず成立する +"""