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

print((N-1) // 2)

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

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

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

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

Solution (Python):
def solve(n):
    return (n - 1) // 2
assert solve(4) == 1
assert solve(999999) == 499999

n = int(input())
print(solve(n))

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

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

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

print (count)

Solution (Python):
n = int(input())
import sys
if n == 1 or n == 2:
    print(0)
    sys.exit()
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(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-1)

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

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

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

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

if N == 0:
  print(0)
elif 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())
from math import factorial
print((n-1)//2)

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

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

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

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

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

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

else:
    ans = (N - 1) // 2

print(ans)

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

Solution (Python):

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

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

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

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

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

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

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

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

ans = N // 2

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

print(ans)

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

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

print((N-1)//2)

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    cnt = 0
    for i in range(1, n // 2 if n % 2 == 0 else n // 2 + 1):
        if n - i <= n:
            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 == 1 or N == 2:
    print(0)
else:
    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:
    print(int(N/2-1))
else:
    print(int((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):
N = int(input())

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

else:
    ans = N / 2 - 1

print(int(ans))

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

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

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

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

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

if __name__ == "__main__":
    main()

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



def main():
    from math import ceil

    n = int(input())
    count = 0

    for i in range(1, ceil(n / 2)):
        j = n - i

        if i != j:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

Solution (Python):
import math

N = int(input())

N = N / 2 - 1

print(math.ceil(N))

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

Solution (Python):


'''
------------------------
author : iiou16
------------------------
'''


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

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

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):
n = int(input())
c=0
for i in range(1,(n//2)+1):
    if((n-i) != i):
        c+=1


print(c)

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

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 




 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    ans = N-1
    ans = ans // 2
    print(ans)
    
    
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(int((N-1)/2));

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

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

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

print((n-1)//2)

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

for a in range(1,N//2 +1):
  b = N - a
  if a == b:
    continue
  else:
    ans += 1
    
print(ans)

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

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

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

Solution (Python):
N=int(input())
num=N
count=0

while num>int(N/2):
    num-=1
    count+=1

print(count-1)

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

Solution (Python):
import math

N = int(input())

if N % 2 == 0 :
    num = N/2 - 1
    print (math.floor(num))
else :
    num = N/2
    print (math.floor(num))

Solution (Python):
input_val = input()

val = int(input_val)
val = val - 1
ans = int(val/2)

print(ans)

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

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

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

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

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

Solution (Python):

if __name__ == '__main__':
    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())

a = N//2
b = N%2

if b==0:
  a -=1

print(a)

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+1)/2)):
  if i != N - i:
    ans += 1
print(ans)

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

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

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

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

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

Solution (Python):
import math

N = int(input())
ans = math.floor(N / 2)

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

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

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

Solution (Python):
from math import ceil

n = int(input())

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

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



            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            




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

Solution (Python):
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+1)//2-1)

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

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

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

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

print(result)

Solution (Python):
N = int(input())
print(sum(i<N-i for i in range(1,N)))

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

n = int(input())
a = math.floor(n / 2)
if(n%2 == 0):
    a=a-1

print(a)

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

Solution (Python):


n = int(input().rstrip())
count = 0

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

Solution (Python):


N = int(input())

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

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

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

Solution (Python):
import math

N = int(input())


def solve():
    nn = math.ceil(N / 2)
    return nn - 1


print(solve())

Solution (Python):
N = int(input())
if N % 2 == 0 :
  print("{}".format(N//2-1))
else:
  print("{}".format(N//2))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
print((int(input()) - 1) >> 1)

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

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

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

Solution (Python):
a = int(input())
print(a//2-0**(a%2))

Solution (Python):

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
print~-input()/2

Solution (Python):
print(int(input())-1>>1)

Solution (Python):
import math

N = int(input())
print(math.floor((N - 1)/2))

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

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

Solution (Python):
import sys

n = int(input())

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

print('{}'.format(ans))

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

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

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

Solution (Python):

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

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

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

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

sup = int(N // 2) + 1

L = []

for i in range(1,sup):
  diff = N - i
  pair = [i,diff]
  pair = set(pair)
  if len(pair) == 2:
    L.append(pair)


    
print(len(L))

Solution (Python):
import os
import numpy as np

class getStdin(object):
    @classmethod
    def get_int(cls):
        return int(input())

    @classmethod
    def get_ss_int(cls):
        return list(map(int, input().split()))

    @classmethod
    def get_na_int(cls):
        return np.array(sorted(list(map(int, input().split()))))

    @classmethod
    def get_na_intr(cls):
        return np.array(sorted(list(map(int, input().split())))[::-1])

if __name__ == '__main__':
    n = getStdin.get_int()
    if n % 2 == 0:
        print(n//2 -1)
    else:
        print(n//2)
    os.sys.exit(0)

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

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

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

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

print('{}'.format(ans))

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

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

n=int(n/2+0.5-1)
print(n)

Solution (Python):

import sys
input = sys.stdin.readline
def solve():
  n = int(input())
  ans = 0
  for i in range(1,1+n//2):
    j = n-i
    if j > i:
      ans += 1
  print(ans)
solve()

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


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

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 math
n = int(input())
a = n/2
print(math.ceil(a)-1)

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

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

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

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

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

Solution (Python):
n=int(input())
if n==1:
  print(0)
for i in range(1,n):
  if n-i<=i:
    print(i-1)
    break

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

value = 0
if a%2 == 0:
    value = round(a/2-1)
else:
    value = round((a+1)/2-1)
print(value)

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

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

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

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

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

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

Solution (Python):

import math

if __name__ == "__main__":
    N = int(input())
    if N % 2 == 0:
        hoge = N / 2
        print(math.floor(hoge) - 1)
    else:
        print(math.floor(N / 2))

Solution (Python):
def solve(n):
    if n % 2 == 0:
        return n // 2 - 1
    else:
        return (n - 1) // 2


def main():
    n = int(input())
    res = solve(n)
    print(res)


def test():
    assert solve(4) == 1
    assert solve(999999) == 499999


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

Solution (Python):
N = int(input())
a = []
 
for x in range(1, N):
    y = N-x
    if x == y:
        continue
    if x > y:
        break
    a.append([x, y])
 
print(len(a))

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

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

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

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

Solution (Python):
s = raw_input().split()
[N] = s
N = int(N)

print ((N-1)/2)

Solution (Python):
def solution(N):
    ans = 0
    for i in range(N-1, int(N/2), -1):
        j = N-i
        ans+=1
    return ans

test_input = input()
test_input = int(test_input)
print(solution(test_input))

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

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

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

print((N-1)//2)

Solution (Python):
N = int(input())
ans = set()
for i in range(1, N + 1):
    j = N - i
    if i == j or i == 0 or j == 0:
        continue
    ans.add((min(i, j), max(i, j)))
print(len(ans))

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

    print(round(((n-2)/2)))


else:
    print(round(((n+1)/2)-1))

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

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

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

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

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


import math





















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



	

if __name__ == '__main__':
	main()

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

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

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

Solution (Python):
from sys import stdin
a= int(stdin.readline().rstrip())
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 math
N1 = input()
N = int(N1)
i = 0
j = 1
r = 0
a = 0
for j in range (N):
    i=N-j
    if i!=j : 
        r+=1
        
a = math.floor (r/2)
print(a)

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

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

else :
    print(round((N-1)/2))

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

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

Solution (Python):



import pdb
import sys
F = sys.stdin
N = int(F.readline())
count = 0

A = N // 2

for i in range(1, A+1):
    if i*2 != N:
        count += 1

print(count)

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

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

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

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

if N < 3:
  print(0)
elif N % 2 == 0:
  print(N//2 - 1)
elif N % 2 != 0:
  print((N+1)//2 - 1 )

Solution (Python):
def main():                                                                     
  n = int(raw_input())                                                          
  data = {}                                                                     
                                                                                
  for a in xrange(1,n):                                                         
      b = n-a                                                                   
      if a == b:                                                                
          continue                                                              
      data[(min(a,b), max(a, b))] = 1                                           
                                                                                
  print(len(data.keys()))                                                       
                                                                                
main()

Solution (Python):


def main():
  inline = [input() for i in range(1)]
  outline = 0

  try:
    wk_inline = int(inline[0])
  except Exception as e:
    print('整数値を入力してください')
    return 0

  if wk_inline % 2 == 0:
      outline = wk_inline //2 -1
  else:
      outline = wk_inline // 2

  print(outline)
  return 0

main()

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

print((i-1)//2)

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

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

Solution (Python):


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


if __name__ == '__main__':
    solve()

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

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

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

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

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

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

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

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

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

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

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

a-=1
cnt = 0
for i in range(1,a):
	if i < a:
		a -= 1
		cnt += 1
	else :
		break

print (cnt)

Solution (Python):
num = int(input())
numList = list(range(0, num))
listLength = len(numList)
counter = 0



m = [0] * 10000000

for i in range(0, listLength):
    m[numList[i]]
    m[numList[i]] += 1

secondCount = 0

for i in range(0, listLength):
    secondCount += m[num - numList[i]]
    if (num - numList[i] == numList[i]):
        secondCount -= 1

print(int(secondCount / 2))

Solution (Python):

N = int(input())

if N % 2 == 1:
    N += 1

print(N // 2 - 1)

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

Solution (Python):
from math import floor

N = int(input())

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

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

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

if n % 2 != 0:
  n += 1
 
for i in range(1, n // 2):
  if n - i == i:
    continue
    
  else:
    count += 1
    
print(count)

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

ans = int(len(range(1,N))/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())
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 // 2)

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