import sys

read = sys.stdin.buffer.read

input = sys.stdin.buffer.readline

inputs= sys.stdin.buffer.readlines

#rstrip().decode('utf-8')



import math

#import numpy as np

#import operator

#import bisect

#from heapq import heapify,heappop,heappush

#from math import gcd

#from fractions import gcd

#from collections import deque

#from collections import defaultdict

#from collections import Counter

#from itertools import accumulate

#from itertools import groupby

#from itertools import permutations

#from itertools import combinations

#from scipy.sparse import csr_matrix

#from scipy.sparse.csgraph import floyd_warshall

#from scipy.sparse.csgraph import csgraph_from_dense

#from scipy.sparse.csgraph import dijkstra

#sys.setrecursionlimit(10**7)



#map(int,input().split())



def main():

	

	n=int(eval(input()))

	print(((n-1)//2))







	



if __name__ == '__main__':

	main()
import sys

input = sys.stdin.buffer.readline



#sys.setrecursionlimit(10**9)

#from functools import lru_cache



def RD(): return sys.stdin.read()

def II(): return int(eval(input()))

def MI(): return list(map(int,input().split()))

def MF(): return list(map(float,input().split()))

def LI(): return list(map(int,input().split()))

def LF(): return list(map(float,input().split()))

def TI(): return tuple(map(int,input().split()))

# rstrip().decode()



def main():

	n=II()



	print(((n-1)//2))



















if __name__ == "__main__":

	main()

import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines
# rstrip().decode('utf-8')
import math

# import numpy as np
# import operator
# import bisect
# from heapq import heapify,heappop,heappush
# from math import gcd
# from fractions import gcd
# from collections import deque
# from collections import defaultdict
# from collections import Counter
# from itertools import accumulate
# from itertools import groupby
# from itertools import permutations
# from itertools import combinations
# from scipy.sparse import csr_matrix
# from scipy.sparse.csgraph import floyd_warshall
# from scipy.sparse.csgraph import csgraph_from_dense
# from scipy.sparse.csgraph import dijkstra
# sys.setrecursionlimit(10**7)
# map(int,input().split())
def main():
    n = int(eval(input()))
    print(((n - 1) // 2))


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**9)
# from functools import lru_cache
def RD():
    return sys.stdin.read()


def II():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def MF():
    return list(map(float, input().split()))


def LI():
    return list(map(int, input().split()))


def LF():
    return list(map(float, input().split()))


def TI():
    return tuple(map(int, input().split()))


# rstrip().decode()
def main():
    n = II()
    print(((n - 1) // 2))


if __name__ == "__main__":
    main()

-read = sys.stdin.buffer.read -inputs = sys.stdin.buffer.readlines -# rstrip().decode('utf-8') -import math +# sys.setrecursionlimit(10**9) +# from functools import lru_cache +def RD(): +    return sys.stdin.read() -# import numpy as np -# import operator -# import bisect -# from heapq import heapify,heappop,heappush -# from math import gcd -# from fractions import gcd -# from collections import deque -# from collections import defaultdict -# from collections import Counter -# from itertools import accumulate -# from itertools import groupby -# from itertools import permutations -# from itertools import combinations -# from scipy.sparse import csr_matrix -# from scipy.sparse.csgraph import floyd_warshall -# from scipy.sparse.csgraph import csgraph_from_dense -# from scipy.sparse.csgraph import dijkstra -# sys.setrecursionlimit(10**7) -# map(int,input().split()) + +def II(): +    return int(eval(input())) + + +def MI(): +    return list(map(int, input().split())) + + +def MF(): +    return list(map(float, input().split())) + + +def LI(): +    return list(map(int, input().split())) + + +def LF(): +    return list(map(float, input().split())) + + +def TI(): +    return tuple(map(int, input().split())) + + +# rstrip().decode() -    n = int(eval(input())) +    n = II()