program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: x,mx

    read*, x
    mx = mod(x,11_8)
    print'(i0)', 2_8*(x/11_8)+and(mx,1_8)+and(mx/6_8,1_8)
end program name