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=n//2

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

print(ans)

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

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

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

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

Solution (Python):
words = lambda t : list(map(t, input().split()))
n = int(input())

print((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):
N = int(input())
answer = N // 2
if N % 2 == 0:
    answer -= 1
print(answer)

Solution (Python):
li = list(map(int,input().split()))
n=li[0]
if(n%2==0):
    print(int(n/2-1))
else:
    print(int((n-1)/2))

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

N = int(input())

print(int((N+1)/2)-1)

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

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

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):
n = int(input())
if n % 2 == 0:
  print(n // 2 - 1)
else:
  print(n // 2)

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

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

Solution (Python):




n = int(input())

ans = 0
for i in range(1,n):
    j = n - i
    if j != i and i < j and j > 0:
        ans += 1
print(ans)

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

count = 0
for i in range(1, N//2+1):
    j = N - i
    if i != j:
        count += 1

print(count)

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

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N):
    if N - i != i:
        ans += 1
print(ans//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())
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())
if N%2==1:
    print(N//2)
else:
    print(N//2-1)

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

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

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

print(ceil(n/2) - 1)

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

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

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

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

Solution (Python):


import sys
import math
import collections



n=int(input())





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

Solution (Python):

import sys
input = lambda: sys.stdin.buffer.readline()[:-1].decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7

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

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

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


print(ans)

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

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(int((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())

ans = 0
for a in range(1, N):
    b = N - a
    if a >= b: break
    else: ans += 1

if N <= 2:
    print(0)
else:
    print(ans)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
a = 1
b = n-1
print((n-1)//2)

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

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

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

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

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


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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
if n == 1:
    print(0)
    exit(0)
l = 1
r = n-1
ans = 0
while l < r:
    l+=1
    r-=1
    ans += 1
print(ans)

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

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

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

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(n//2-1)
else:
    print((n+1)//2-1)

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

print((n-1)//2)

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

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

Solution (Python):
import collections
import sys

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

def read_a_list(dtype):
    return list(map(dtype, sys.stdin.readline().split()))

def main():
    N = read_a_integer()
    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())

print((n-1)//2)

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

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

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

N = int(input())
vis = set()
for i in range(1, N):
  if i in vis: continue
  if i == N - i: continue
  vis.add(i)
  vis.add(N - i)
print(len(vis) // 2)

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

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

Solution (Python):
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

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

N=one_int()

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10000000)


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



if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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):
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())
if n % 2 == 0:
    print(n // 2 -1)
else:
    print(max(0, (n-1)//2))

Solution (Python):
import sys
N = int(sys.stdin.readline().strip())
print((N - 1) // 2)

Solution (Python):
def main():
    N = int(input())
    if N % 2 == 0:
        N -= 1
    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):
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-1)//2)

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

Solution (Python):
A = int(input())
print((A-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(n // 2)

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

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

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

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

print((N -1) // 2)

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

Solution (Python):
def main():
    n = int(input())
    if n % 2 == 0:
        print(int(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):
n  = int(input())
if n % 2 == 0:
    print((n - 2) // 2)
else:
    print((n - 1) // 2)

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

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

    ans = (n - 1) // 2

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

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

main()

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())

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())
if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

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

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

Solution (Python):
print(~-int(input())//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//2-1 if N%2 ==0 else N//2)

Solution (Python):
def nums():
    return list(map(int,input().split(" ")))
def num():
    return int(input())
def yakusu(n):
    res = set()
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            res.add((i,int(n/i)))
    return res
import math
x = num()
print(math.ceil(x / 2 - 1))

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

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


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


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    return math.ceil(N / 2) - 1


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):


import sys
import math
import collections

N, = map(int, sys.stdin.readline().rstrip().split(" "))
print(N//2-1+N%2)
exit(0)

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-1)/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(ans)

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

print((N-1)//2)

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

print((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
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

Solution (Python):


n = int(input())

ret=(n-1)//2

print(ret)

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

print((N-1)//2)

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
def main():
    N = int(input())
    if N % 2 == 0: return (N-2)//2
    return N//2
if __name__ == '__main__':
    
    print(main())

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:
    print(N//2-1)
else:
    print(N//2)

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

Solution (Python):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])

    half = N // 2
    if N % 2 == 0:
        return half - 1
    else:
        return half


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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

Solution (Python):
n=int(input())
if n%2:print((n+1)//2-1)
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//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())
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())
print((N - 1) // 2)

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

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

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


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


if __name__ == '__main__':
    main()

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

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

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


if __name__ == "__main__":
    main()

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

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

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = 0
memo = {}
for i in range(1, n):
    if n - i != i and n - i not in memo:
        memo[i] = 1
        memo[n-i] = 1
        ans += 1
print(ans)

Solution (Python):
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

N = int(input())

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

print(ans)

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==1:
    print(N//2)
else:
    print(N//2-1)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n):
    j = n-i
    if i >= j:
        continue
    ans+=1
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

n = ri()
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())
ans = 0
for i in range(1, n):
  if (n-i) != i and (n-i) > i:
    ans += 1
print(ans)

Solution (Python):











def solve():
    import sys
    input = sys.stdin.readline
    n = int(input())
    if n % 2 == 0:
        print(n // 2 - 1)
    else:
        print(n // 2)


if __name__ == '__main__':
    solve()

Solution (Python):
N = int(input())
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(n//2)

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

Solution (Python):
print((int(input())-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):
N = int(input())

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

Solution (Python):
N=int(input())
S=set()
for i in range(1,N):
    x=i
    y=N-i
    if x<y:
        S.add(x)
print(len(S))

Solution (Python):
import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations
from itertools import combinations


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


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


def nu ():
	return int (input ())


def find_gcd ( x, y ):
	while (y):
		x, y = y, x % y
	return x


def lcm ( x, y ):
	gg = find_gcd (x, y)
	return (x * y // gg)



mm = 1000000007
def solve ():
	t = 1
	for tt in range (t):
		n=nu()
		if(n%2==0):
			print(n//2-1)
		else:
			print(n//2)








if __name__ == "__main__":
	solve ()

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]






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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
print((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 heapq
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

def main():
    n = getN()
    ans = 0
    for i in range(1, n//2+1):
        if (n-i) != i and (n-1) > 0:
            ans += 1

    print(ans)

    return

if __name__ == "__main__":
    main()

"""
10
203941992 742164984
670850202 743524472
687298546 744891559
676493045 744182895
385467254 742631752
740505911 744926772
425723256 743348462
225362543 742332848
399450535 742706299
563528474 743419738
"""

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

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

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()

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


print(main())

Solution (Python):

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

Solution (Python):
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


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

s = set()
for i in range(1, N):
    a = N - i
    b = i
    if a == b:
        continue
    s.add((max(a, b), min(a, b)))
a = len(s)
print(a)

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

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

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string


import random  
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')



input=lambda: sys.stdin.readline().rstrip()

show_flg=False


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


    

print(ans)

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())

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+1)//2-1)

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

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

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

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

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):

import copy
import random
import bisect 
import fractions 
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) 

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

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

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
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 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)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    print((n-1)>>1)
    return


if __name__ == "__main__":
    solve()

Solution (Python):

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

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

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

print(N // 2 - 1 + N % 2)

Solution (Python):
def main():
    n = int(input())
    if n%2 == 0:
        n -= 1

    print(n//2)


main()

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

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

print(ans)

Solution (Python):
n=int(input())
print(n//2 if n%2==1 else 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())
print((N-1)//2)

Solution (Python):

from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re
import heapq


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n = ii()

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

main()

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

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

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

print((N-1)//2)

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

answer = N//2 if N&1 else N//2-1
print(answer)

Solution (Python):

n = int(input())

print((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):
n=int(input())
print((n-1)//2)

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

count = 0
for i in range(1, n):
    if i < n-i:
        count += 1

print(count)

Solution (Python):
from heapq import heappush, heappop
from collections import deque
import re
import math
import functools

def sRaw():
    return input().rstrip("\r")

def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


def gcd(a, b):
    if(b == 0):
        return a
    return gcd(b, a % b)


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    
def ZAlgo(s):
    l = len(s)
    A = [0]*l
    i =1
    j =0
    A[0]=l
    while i<l:
        while i+j<l and s[j] == s[i+j]:
            j+=1
        if j==0:
            i+=1
            continue
        A[i]=j
        k=1
        while (i+k<l) and (k+A[k]<j):
            A[i+k] =A[k]
            k+=1
        i+=k
        j-=k
    return A


def main():
    N = iRaw()
    ans =0
    if N%2!=0:
        return N//2
    else:
        return (N-1)//2

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

Solution (Python):

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

N = inp()
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(n // 2 - 1)
else:
    print(n // 2)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
inf=float("inf")
n=int(input())
if n%2==0:
    print((n-1)//2)
else:
    print(n//2)

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

if __name__ == "__main__":
    main()

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

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

if __name__ == '__main__':
    main()

Solution (Python):

import sys
input = sys.stdin.buffer.readline


from collections import defaultdict


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


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())

ret = 0
for i in range(1, N + 1) :
    if i < N - i :
        ret += 1
        
print(ret)

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):
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())
print(n//2-(n+1)%2)