import sys

a = int(input())

y = a % 7 

print(y + 1)