Problem:
 Score : 100 points    Problem Statement How many ways are there to choose two distinct positive integers totaling N , disregarding the order?      Constraints  1 \leq N \leq 10^6  N is an integer.         Input Input is given from Standard Input in the following format:  N       Output Print the answer.        Sample Input 1 4      Sample Output 1 1  There is only one way to choose two distinct integers totaling 4 : to choose 1 and 3 . (Choosing 3 and 1 is not considered different from this.)       Sample Input 2 999999      Sample Output 2 499999

Solution (Python):
N = int(input())

ans = 0
for i in range(1, N):
    j = N - i
    if j > 1 and j > i:
        ans += 1

print(ans)

Solution (Python):
import math

n = int(input())
count = 0
for i in range(1, math.ceil(n / 2)):
    count += 1

print(count)

Solution (Python):
N = int(input())
if N % 2 ==0:
  print(int(N / 2 - 1))
else:
  print(int((N-1) / 2))

Solution (Python):
n=int(input())
if n%2==1:
	n=n-1
else:
	n=n-2
print(int(n/2))

Solution (Python):
n = int(input())
ans = n // 2

if n % 2 == 0:
    ans -= 1

print(ans)

Solution (Python):
N = int(input())

print((N-1)//2)

Solution (Python):
import sys

def main():
    N = int(input())
    c = 0
    for i in range(1, N):
        j = N - i
        if j <= i:
            break
        c += 1
    print(c)

main()

Solution (Python):
n=int(input())
if n%2==0:
    print(n//2-1)
else:
    print((n-1)//2)

Solution (Python):
n = int(input())
ct = 0

for i in range(1,int(n/2)+1):
    if i == n-i:
        continue
    ct += 1

print(ct)

Solution (Python):
n = int(input()) 

if n%2 == 0:
    print((n)//2-1)
else:
    print((n+1)//2-1)

Solution (Python):
print((int(input()) - 1)//2)

Solution (Python):
N = int(input())
print(N // 2 if N % 2 else N // 2 - 1)

Solution (Python):
N = int(input())
if N%2 == 0:
    ans=N//2 -1
else:
    ans=(N+1)//2 -1
print(ans)

Solution (Python):


N = int(input())
ans = 0

if N % 2 == 0:
    ans = (N - 2) // 2
    print(ans)

if N % 2 != 0:
    ans = (N - 1) // 2
    print(ans)

Solution (Python):
n=int(input())
if n%2==0:
  print(n//2-1)
else:
  print(n//2)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(int(N/2-1))
else:
    print(int(N/2))

Solution (Python):
n = int(input())
if n % 2 == 0:
    n = n//2 - 1
else:
    n = n // 2

print(n)

Solution (Python):
a = int(input())
if a%2 == 0:
    b = a/2 - 1
else: b = (a + 1)/2 - 1
print(int(b))

Solution (Python):
N = int(input())
if N<=2:
    print(0)
elif N<=4:
    print(1)
elif N<=6:
    print(2)
else:
    print((N-7)//2+3)

Solution (Python):
N = int(input())

if N%2 == 0:
    print N/2 -1
else:
    print N/2

Solution (Python):
N = int(input())

if (N-1)%2 == 0:
    print(int((N-1)/2))
else:
    print(int((N-2)/2))

Solution (Python):
n = int(input())
if n % 2 == 0:
  print(n//2-1)
else:
  print(n//2)

Solution (Python):
n = int(input())

if n % 2 == 0:
    print((n // 2) - 1)
elif n % 2 == 1:
    print((n - 1) // 2)

Solution (Python):
import sys
N = int(input())
if N%2==0:
    val = int(N / 2) - 1
else:
    val = int(N / 2)
print(val)

Solution (Python):
n = int(input())
if n % 2 == 1:
    print(n//2)
else:
    print((n//2) - 1)

Solution (Python):
N = int(input())

ans = 0

if N % 2 == 0:
  print(int((N/2)-1))
else:
  print(int(((N-1)/2)))

Solution (Python):
def main(n):
    if n % 2 != 0:
        n += 1
    half = n // 2
    return half - 1


if __name__ == '__main__':
    N = int(input())
    print(main(N))

Solution (Python):
n = int(input())
print((n-1)//2)

Solution (Python):
n = int(raw_input())
if n % 2 == 0:
    print (n / 2) - 1
else:
    print n / 2

Solution (Python):
N = int(input())

ans = (N - 1)// 2

print(ans)

Solution (Python):

N = int(input())

if N % 2 != 0:
    print(int(N/2))
else:
    print(int(N/2)-1)

Solution (Python):
n=int(input())

if n%2==0:
    print((n-2)//2)
else:
    print(n//2)

Solution (Python):
import math
print(math.ceil(int(input()) / 2) - 1)

Solution (Python):
n=int(input())
if n%2==1:
  print((n-1)//2)
else:
  print(n//2-1)

Solution (Python):
N = int(input())
if N%2==1:
    print(int((N-1)/2))
else:
    print(int((N-2)/2))

Solution (Python):
n = int(input())
print((n-1)//2)

Solution (Python):
import math

n=int(input())

print(math.floor((n-1) / 2))

Solution (Python):
N = int(input())
count = 0
for i in range(1, N//2+1):
    if (N-i) >= 1 and i+i != N:
        count+=1
print(count)

Solution (Python):
a=int(input())
if a % 2 == 0:
    print(str(int(a / 2-1)))
else:
    print(str(int((a-1)/2)))

Solution (Python):
s=list(map(int,input().split()))
if s[0]==1:
  print(0)
elif s[0]!=1 and s[0]%2==0:
  a=int(s[0]//2-1)
  print(a)
else:
  a=int(s[0]//2)
  print(a)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 18
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

Solution (Python):
n = int(input())

c = 0

if n%2 == 0:
  print(n//2 - 1)
else:
  print(n//2)

Solution (Python):
n = int(input())
print((n - 1) // 2)

Solution (Python):
N = int(input())
if N%2==0:
    ans = N//2-1
    print(ans)
else:
    ans = N//2
    print(ans)

Solution (Python):

N = int(input())

if N % 2 ==0:
    ans = (N-2)/2
else:
    ans = (N-1)/2
print(int(ans))

Solution (Python):
n = int(input())
answer=0
if n % 2 == 0:
    answer=n/2-1
else:
    answer=(n-1)/2
print(int(answer))

Solution (Python):
n = int(input())
if n % 2 == 1:
    ans = (n-1) // 2
else:
    ans = (n-2) // 2
print(ans)

Solution (Python):
n = int(input())

if n%2==0:
    print(int(n/2-1))
else:
    print(int((n-1)/2))

Solution (Python):
n=int(input())
if n%2==0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
N=int(input())
M=0
for i in range(1,N):
    if N-i>0 and N//2<i:
        M+=1
print(M)

Solution (Python):
import numpy as np


N = int(input())

if N % 2 == 0:
    print(int((N - 2) / 2))
else:
    print(int((N - 1) / 2))

Solution (Python):
import sys

def solve(a):
    if a % 2 == 0:
        print(a // 2 - 1)
    else:
        print(a // 2)

if __name__ == '__main__':
    a = int(sys.stdin.readline().strip())
    solve(a)

Solution (Python):
N=int(input())
if N%2==0:
  print(N//2-1)
else:
  print(N//2)

Solution (Python):
n = int(input())

print(n//2-bool(not(n%2)))

Solution (Python):
N=int(input())
ret=(N-1)/2//1
print(int(ret))

Solution (Python):

N = int(input())

if N % 2 == 0:
    print((N // 2) - 1)
else:
    print(N // 2)

Solution (Python):
n = int(input())

if n%2==0:
    n/=2
    n-=1
    print(int(n))
else:
    n+=1
    n/=2
    n-=1
    print(int(n))

Solution (Python):

a = int(input())

if a % 2 == 0:
    r = a/2 -1
else:
    r = (a-1)/2

print("{}".format(int(r)))

Solution (Python):
N=int(input())

if N%2==0:
    print((N-1)//2)
else:
    print(N//2)

Solution (Python):
import math

N = int(input())

print(math.floor((N-1)/2))

Solution (Python):
N = int(input())
if N%2 == 0:
    print(int(N/2 - 1))
else:
    print(int((N-1)/2))

Solution (Python):
N = int(input())
import math
print(math.ceil(N/2)-1)

Solution (Python):
N  = int(input())
if N%2 == 0:
    print(N//2 - 1)
else:
    print(N//2)

Solution (Python):
import sys
input = sys.stdin.readline


def main():
    N = int(input())
    if N == 1 or N == 2:
        print(0)
        return

    print((N-1)//2)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline

_n = int(input())

print((_n - 1) // 2)

Solution (Python):
string = input()
n = int(string)
print((n - 1) // 2)

Solution (Python):
N=int(input())
print(int(N/2-1) if N%2==0 else int((N-1)/2))

Solution (Python):
import sys
inputs = sys.stdin.readlines()
n = int(inputs[0])

if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

Solution (Python):
N = int(input())

if N % 2 == 0:
    N = int(N/2 - 1)
else:
    N = int((N-1)/2)

print(N)

Solution (Python):
N = int(input())
ans = 0
for a in range(1, N+1):
    b = N - a
    if a > 0 and b > 0 and a != b:
        ans += 1
ans //= 2
print(ans)

Solution (Python):
N=int(input())

if N%2==0:
  print((N//2)-1)
else:
  print((N+1)//2-1)

Solution (Python):
N = int(input())
ans = int((N-1)/2)
print(ans)

Solution (Python):
n=int(input())
print((n-1)//2 if n%2==1 else n//2-1)

Solution (Python):
n = int(input())
print((n-1)//2)

Solution (Python):
n = int(input())
if n%2==1:
    print((n-1)//2)
else:
    print((n//2)-1)

Solution (Python):
n = int(input())
if n%2==0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


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


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


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


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    N = II()

    if N % 2 == 0:
        print((N//2)-1)
    else:
        print(N//2)
    return




def B():
    N = II()
    if N <= 81 and N > 9:
        for i in range(2, 10):
            if N % i == 0 and N/i <= 9:
                print('Yes')
                return

    elif N > 81:
        print('No')
        return
    else:
        print('Yes')
        return
    print('No')

    return




def C():
    N = II()

    L = []
    count = 0
    for i in range(2, int(sqrt(N)+2)):
        if N % i == 0:
            L.append(N/i)
            count = 1
    if count == 0:
        print(N-1)
    else:
        print(int(L[-1]-2+(N/L[-1])))

    return




def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return




def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return




def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    



def solution(S):
    
    N = len(S)

    pass



if __name__ == '__main__':
    A()

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n // 2 - 1)
else:
    print((n - 1) // 2)

Solution (Python):
N = int(input())

print((N-1)//2)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(int(N/2)-1)
else:
    print(int((N-1)/2))

Solution (Python):
n=int(input())
if n%2==0:
  print(n//2-1)
else:
  print((n-1)//2)

Solution (Python):
from math import ceil
print(ceil(int(input()) / 2 - 1))

Solution (Python):
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math


N = int(stdin.readline().rstrip())
N = int((N-1) / 2)
print(N)

Solution (Python):
n = int(input())

if n == 1 or n==2:
  print(0)
elif n%2==0:
  print(n//2-1)
else:
  print((n+1)//2-1)

Solution (Python):
N = int(input())
if N % 2 == 0:
    print(N // 2 - 1)
else:
    print(N // 2)

Solution (Python):


def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N = readInts()[0]

  if N % 2 == 0:
    print(N // 2 - 1)
  else:
    print(N // 2)

if __name__ == "__main__":
  main()

Solution (Python):
N = int(input())
if N%2==0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
if __name__ == "__main__":
    n = int(input())
    print(str(n % 2 + n//2 - 1))

Solution (Python):
n = int(input())


if(n%2==0) :
        print(int(n/2)-1)
else :
        print(int(n/2))

Solution (Python):


n = int(input())
if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

Solution (Python):
N = int(input())
Ans = 0
if N % 2 == 0:
  Ans = N // 2 - 1
else:
  Ans = N // 2

print(Ans)

Solution (Python):
import sys
import math
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()

ans = 0
for i in range(1,N):
  a = N - i
  if a != i:
    ans += 1
print(ans//2)

Solution (Python):
n=int(input())
if n%2==0:
  print(int(n/2)-1)
else:
  print(int((n+1)//2-1))

Solution (Python):
n=int(input())
if n%2==0:
    Ans=n//2-1
else:
    Ans=n//2
print(Ans)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(int((N//2)-1))
else:
    print(int((N//2)))

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 

n = int(input())



if n%2==0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
N=int(input())
cnt=0
X=N/2
while X>1:
  X=X-1
  cnt=cnt+1
print(cnt)

Solution (Python):
def solve():
    i = int(input())
    print(i // 2 -1 if i % 2 == 0 else i // 2)


if __name__ == "__main__":
    solve()

Solution (Python):
n=int(input())
if n%2==0:n=n/2-1
else:n=n//2
print(int(n))

Solution (Python):
n = int(input())
ans = 0
for a in range(1, n):
    b = n - a
    if b < a:
        break
    if b != a and b > 0:
        ans += 1
print(ans)

Solution (Python):
n=int(input())
print((n//2+n%2)-1)

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
  n = ni()
  res = set()
  for i in range(1, n // 2 + 1):
    a, b = n - i, i
    if a == b:
        continue
    if (a, b) not in res and (b, a) not in res:
      res.add((a, b))
  print(len(res))
  
if __name__ == '__main__':
  main()

Solution (Python):

import sys


def rint():
    return map(int, sys.stdin.readline().split())

def input():
    return sys.stdin.readline().rstrip('\n')

def oint():
    return int(input())

N = oint()

ans = N//2

if N%2== 0:
    ans -= 1

print(ans)

Solution (Python):
N = int(input())

if N == 1:
    print(0)
    exit()

cnt = 0 if N % 2 == 0 else 1
for i in range(1, N // 2):
    cnt += 1

print(cnt)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(int((N-2)/2))
else:
    print(int((N-1)/2))

Solution (Python):
n = int(input())

if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

Solution (Python):
import sys

N = int(sys.stdin.readline())


if N%2 == 0:
    ans = (N // 2) - 1
else:
    ans = (N//2)

print(ans)

Solution (Python):
A = int(input())
if A % 2 == 0:
  print((A//2)-1)
else:
  print(A//2)

Solution (Python):
N = int(input())

if N % 2 == 0:
    print(N // 2 - 1)
else:
    print(N//2)

Solution (Python):



import sys


input = sys.stdin.readline


def main():
    N = int(input())

    print(N//2 if N % 2 == 1 else N//2-1)


if __name__ == '__main__':
    main()

Solution (Python):
import bisect

mod = 1000000007

def main():
    n = int(input())
    print((n-1)//2)
    return


if __name__=='__main__':
    main()

Solution (Python):
N = int(input())


if N % 2 == 0:
    print(N//2-1)
else:
    print((N-1)//2)

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = True
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    n = II()

    print((n-1)//2)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
if n % 2 ==0:
  print(int(n/2-1))
else:
  print(int((n-1)/2))

Solution (Python):
n = int(input())
if n < 3:
    print(0)
else:
    print((n+1)//2-1)

Solution (Python):
n = int(input())
if (n % 2 == 0):print(n//2-1)
else : print(n//2)

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
n = int(input())
if n%2 == 0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
n = int(input())

print((n-1)//2)

Solution (Python):
N = int(input())
import math
print(math.ceil(N/2)-1)

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):

N = int(input())

ans = 0

for i in range(1,int(N / 2) + 1):
    if N - i != i:
        
        ans += 1
print(ans)

Solution (Python):
N = int(input())

if N % 2 == 1:
    print(N // 2)
else:
    print(N // 2 - 1)

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
N = int(input())
print(N // 2 - int(N // 2 * 2 == N))

Solution (Python):
N = int(input())
if N % 2 == 1:
    out = N // 2
else:
    out = N // 2
    out -= 1
print(out)

Solution (Python):
N = int(input())
print((N - 1) // 2)

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())

    ans = (N + 1) // 2 - 1
    print(ans)


main()

Solution (Python):

def solve():
    N = int(input())
    return N//2 - (1-N%2)
    
if __name__ == '__main__':
    print(solve())

Solution (Python):
n = int(input())
if n%2 == 1:
  print (n // 2)
else:
  print (n // 2 - 1)

Solution (Python):
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        N = int(input())

        if N % 2 == 0:
            print(N // 2 - 1)
        else:
            print(N // 2)



if __name__ == '__main__':
    AtCoder().main()

Solution (Python):
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

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

Solution (Python):
n = int(input())
ans = 0
if n%2 == 0:
    ans = (n//2) - 1
else:
    ans = n//2
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n = int(input().strip())
    ans = 0
    for i in range(1, n):
        j = n - i
        if i == j:
            continue
        ans += 1
    print(ans // 2)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())

if n%2 == 0:
    n -= 1
    
s = n//2

print(s)

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
if N % 2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
n = int(input())

if n % 2 == 0:
    a = (n - 2) / 2
else:
    a = (n - 1) / 2
    
print(int(a))

Solution (Python):
from math import ceil
print(ceil(int(input())/2)-1)

Solution (Python):
a = int(input())
if a % 2 == 0:
    print(a//2-1)
else:
    print(a//2)

Solution (Python):
n = int(input())

if n % 2 == 1 :
    n += 1

print(n // 2 - 1)

Solution (Python):
N = int(input())
def integer(N):
    if N % 2 == 0:
        return N // 2 - 1
    else:
        return (N - 1) // 2
print(integer(N))

Solution (Python):
N=int(input())

if N%2==0:
  print(N//2-1)
else:
  print(N//2)

Solution (Python):
import sys
import math
import bisect
from collections import defaultdict, deque
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]



def A():
    n = I()
    print(n // 2 - 1 if n % 2 == 0 else n // 2)
    return



def B():
    return



def C():
    return



def D():
    return



def E():
    return



def F():
    return



def resolve():
    A()
    return



if __name__ == "__main__":
    A()

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
n = int(input())

if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

Solution (Python):
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

n = INT()

if n%2:
    print((n//2))
else:
    print((n//2)-1)

Solution (Python):
n = int(input())

if n%2 == 0:
    print( int((n-2)/2) )
else:
    print( int( (n-1) /2) )

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n // 2+1):
  if n - i != i:
    ans += 1
print(ans)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    ans = N // 2
    if ans * 2 == N:
        ans -= 1

    return ans

if __name__ == '__main__':
    print(main())

Solution (Python):
n = int(input())
print(n//2-(1-n%2))

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
N = int(input())
print((N+1)//2-1)

Solution (Python):
n = int(input())
if n % 2 == 0:
    ans = n // 2 - 1
else:
    ans = n // 2
print(ans)

Solution (Python):
N = int(input())
if N % 2:
    ans = N//2
else:
    ans = N//2 - 1
print(ans)

Solution (Python):

import sys


def solve(N: int):
    if N%2 == 0:
        print(N//2-1)
    else:
        print(N//2)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())

print((n-1)//2)

Solution (Python):
N = int(input())
print((N + 1 - 2) // 2)

Solution (Python):
n = int(input())
if n % 2 == 1:
  print(n//2)
else:
  print(n//2-1)

Solution (Python):
N = int(input())

if N%2 == 1:
  print(N//2)
else:
  print(N//2-1)

Solution (Python):
n = int(input())
print((n-1)//2)

Solution (Python):
N = int(input())

if N % 2 == 0:
	print((N - 1) // 2)
else:
	print(N // 2)

Solution (Python):
N=int(input())
if N%2==0:
  N=N-1
print((N-1)//2)

Solution (Python):
N = int(input())
ans = N // 2
if N % 2 == 0:
    ans -= 1

print(ans)

Solution (Python):
N = int(input())
print(int((N-1)/2))

Solution (Python):
n=int(input())

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

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
n = int(input())

if n%2 == 0:
        print(n//2-1)
else:
        print(n//2)

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
N = int(input())

if N%2 == 0:
    print((N-2)//2)
else:
    print((N-1)//2)

Solution (Python):
N=int(input())
if N%2==0: print(N//2-1)
else: print(N//2)

Solution (Python):
n = int(input())
print(n//2-1 if n%2==0 else n//2)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    n = ri()
    print((n-1)//2)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())

if n % 2 == 0:
    print(n//2 - 1)
else:
    print(n//2)

Solution (Python):
n=int(input())
if n%2 == 1:
    ans = int(n/2)
else:
    ans = int((n-1)/2)
print(ans)

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
N = int(input())

if N % 2 == 0:
    print(int(N/2 -1))
else:
    print(int(N//2))

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
a = int(input())
print((a - 1) // 2)

Solution (Python):
n = int(input())


print((n-1)//2)

Solution (Python):
n = int(input())
seen = set()
ans = 0
for i in range(1,n):
    if (min(i,n-i),max(i,n-i)) not in seen and min(i,n-i) != max(i,n-i):
        ans += 1
        seen.add((min(i,n-i),max(i,n-i)))
print(ans)

Solution (Python):
N = int(input())
mid = N//2
if N%2==1:
    print(mid)
else:
    print(mid-1)

Solution (Python):
n = int(input())

if n == 1 or n == 2:
    ans = 0
elif n % 2 == 0:
    ans = (n - 2) // 2
else:
    ans = (n - 1) // 2

print(ans)

Solution (Python):
def solve():
    N = int(input())
    ans = 0
    if N % 2 == 0:
        ans = N // 2 - 1
    else:
        ans = N // 2
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
import math
n = int(input())

print(math.ceil((n/2) -1))

Solution (Python):
n=int(input())
if n%2==0:
    ans=(n//2)-1
else:
    ans=n//2
print(ans)

Solution (Python):
N=int(input())
if N % 2 == 1:
  ans = (N - 1)/2
else :
  ans =  (N - 2)/2
print(int(ans))

Solution (Python):
n = int(input())
if n % 2 == 1:
    print((n//2))
else:
    print(n//2-1)

Solution (Python):
import math
N = int(input())

print(math.ceil((N-2)/2))

Solution (Python):
import math
N = int( input() )
print( math.ceil(N / 2) - 1 )

Solution (Python):
n = int(input())
print((n-1)//2)

Solution (Python):

import sys


def solve(N: int):
    print((N-1)//2)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

Solution (Python):
n=int(input())
if n%2==0:
  print(n//2-1)
else:
  print(n//2)

Solution (Python):
import sys
def solve():
    sys.setrecursionlimit(100000)
    input = sys.stdin.readline
    N = int(input())
    if N % 2 == 0:
        print(int(N / 2 - 1))
    else:
        print((N // 2))

if __name__ == '__main__':
    solve()

Solution (Python):
N = int(input())
if N % 2 == 0:
    print(N//2 - 1)
else:
    print(N//2)

Solution (Python):
n = int(input())
print((n+1)//2-1)

Solution (Python):
N = int(input())

if N%2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
mlmis = lambda: [-int(x) for x in input().split()]
INF = float('inf')


def main():
    N = ii()
    print((N-1)//2)


main()

Solution (Python):
N = int(input())
count = 0
for i in range(1, N):
    j = N - i
    if(i>=j):
        break
    count+=1
print(count)

Solution (Python):
n = int(input())

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

Solution (Python):
import os

N=int(input())
if N%2==0:
  print(N//2-1)
else:
  print((N+1)//2-1)

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

Solution (Python):
n=int(input())

if n%2==0:
	print(n//2-1)
else:
	print(n//2)

Solution (Python):
n = int(input())
print(n//2-1 if n%2==0 else n//2)

Solution (Python):
N=int(input())

if N%2==0:
    print((N-1)//2)
else:
    print(N//2)

Solution (Python):
N = int(input())
print((N //2) - 1) if N % 2 == 0 else print(N // 2)

Solution (Python):
n = int(input())

if n%2:
    print(n//2)
else:
    print(n//2-1)

Solution (Python):
print((int(input())-1)//2)

Solution (Python):


N = int(input())

ans = (N+1)//2-1

print(ans)

Solution (Python):
n = int(input())

if n % 2 == 1:
    print(n//2)
else:
    print(n//2-1)

Solution (Python):
n = int(input())

if n % 2 == 0:
    print(n//2 - 1)
else:
    print(n//2)

Solution (Python):
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    cnt = 0
    for i in range(1, n // 2 + 1):
        if n - i != i:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    solve()

Solution (Python):
N=int(input())
if N%2==0:
	print(N//2-1)
else:
	print(N//2)

Solution (Python):
N = int(input())
if N % 2 == 0:
    ans = N//2-1
else:
    ans = N//2
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())

if N % 2 == 0:
    print(N // 2 - 1)
else:
    print((N - 1) // 2)

Solution (Python):
import math
n = int(input())
print(math.ceil(n / 2 - 1))

Solution (Python):


n=int(input())-1
print(n//2)

Solution (Python):
n= int(input())

if(n%2==0):
  print(n//2-1)
else:
  print(n//2)

Solution (Python):
n=int(input())

if n%2==0:
    print(int(n/2-1))
else:
    print(n//2)

Solution (Python):


def main():
    N = int(input())
    print((N-1)//2)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

if N%2==0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    N = int(input())
    if N%2 == 0:
        print(N//2 - 1)
    else:
        print(N//2)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())


if n % 2 == 0:
  print(n // 2 - 1)
else:
  print((n-1)//2)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N = int(input())
ans = 0
for i in range(1, N):
    if i < N - i:
        ans += 1

print(ans)

Solution (Python):
n=int(input())
a=0
if n % 2 == 0:
    print((n-1)//2)
else:
    print((n-1)//2)

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
N = int(input())
print(N//2-1 if N%2==0 else N//2)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
N = int(input())
if N % 2 == 0:
    print(N // 2 - 1)
else:
    print(N // 2)

Solution (Python):
n=int(input())
if n%2==0:
  ans=n/2-1
else:
  ans=(n-1)/2
print(int(ans))

Solution (Python):
n = int(input())
print(-(-n // 2) - 1)

Solution (Python):
N = int(input())
if N % 2 == 1:
  print(N // 2)
else:
  print(N // 2 - 1)

Solution (Python):
N=int(input())
if N%2==0:
    print((N-1)//2)
else:
    print(N//2)

Solution (Python):
n = int(input())
print((n+1)//2-1)

Solution (Python):
n = int(input())
if(n % 2 == 0):
  print(n//2-1)
else:
  print(n//2)

Solution (Python):
n = int(input())

if n % 2 == 0:
    print(n//2 -1)
else:
    print(n//2)

Solution (Python):
n=int(input())
if n%2==0:
    print(n//2-1)
else:
    print(n//2)