# Uses python3
import sys

denom=[1, 5, 10]

def get_change(m):
	cnt=0
	i=len(denom)-1
	preval=m
	while i >= 0:
		#print(i,m,denom[i])
		while m >=denom[i]:
			#print(m)
			m=m-denom[i]
			cnt+=1
		i-=1
	return cnt

if __name__ == '__main__':
	m = int(sys.stdin.read())
	print(get_change(m))

0c6ce86cbe562620d1e857d3c862d7669e7a1de4
<mask token>


def get_change(m):
    cnt = 0
    i = len(denom) - 1
    preval = m
    while i >= 0:
        while m >= denom[i]:
            m = m - denom[i]
            cnt += 1
        i -= 1
    return cnt


<mask token>

<mask token>


def get_change(m):
    cnt = 0
    i = len(denom) - 1
    preval = m
    while i >= 0:
        while m >= denom[i]:
            m = m - denom[i]
            cnt += 1
        i -= 1
    return cnt


if __name__ == '__main__':
    m = int(sys.stdin.read())
    print(get_change(m))

<mask token>
denom = [1, 5, 10]


def get_change(m):
    cnt = 0
    i = len(denom) - 1
    preval = m
    while i >= 0:
        while m >= denom[i]:
            m = m - denom[i]
            cnt += 1
        i -= 1
    return cnt


if __name__ == '__main__':
    m = int(sys.stdin.read())
    print(get_change(m))

import sys
denom = [1, 5, 10]


def get_change(m):
    cnt = 0
    i = len(denom) - 1
    preval = m
    while i >= 0:
        while m >= denom[i]:
            m = m - denom[i]
            cnt += 1
        i -= 1
    return cnt


if __name__ == '__main__':
    m = int(sys.stdin.read())
    print(get_change(m))

# Uses python3
import sys

denom=[1, 5, 10]

def get_change(m):
	cnt=0
	i=len(denom)-1
	preval=m
	while i >= 0:
		#print(i,m,denom[i])
		while m >=denom[i]:
			#print(m)
			m=m-denom[i]
			cnt+=1
		i-=1
	return cnt

if __name__ == '__main__':
	m = int(sys.stdin.read())
	print(get_change(m))
