https://www.acmicpc.net/problem/14916
n = int(input())
dp = [-1]*(100001)
dp[2] = 1
dp[5] = 1
for i in range(3, n+1):
values = []
if 1 <= i-2 < n+1 and dp[i-2] != -1:
values.append(dp[i-2] + 1)
if 1 < i-5 < n+1 and dp[i-5] != -1:
values.append(dp[i-5] + 1)
if len(values) > 0:
dp[i] = min(values)
print(dp[n])