#21k+7x/week=x+3k a=int(input())//(52*7);x=(a-3) if (a-3)<=100 else 100-(a+1)%3;k=(a-x)//3 print(x);print(k)