Bachgold problem is very easy to formulate. Given a positive integer n represent it as a sum of maximum possible number of prime numbers. One can prove that such representation exists for any integer greater than 1.

Recall that integer k is called prime if it is greater than 1 and has exactly two positive integer divisors — 1 and k. 


-----Input-----

The only line of the input contains a single integer n (2 ≤ n ≤ 100 000).


-----Output-----

The first line of the output contains a single integer k — maximum possible number of primes in representation.

The second line should contain k primes with their sum equal to n. You can print them in any order. If there are several optimal solution, print any of them.


-----Examples-----
Input
5

Output
2
2 3

Input
6

Output
3
2 2 2

Difficulty: interview

Starter code:

Solutions:
# 211693RAVMK
def main():
    n = int(input())
    print(n // 2)
    if n % 2 == 0:
        print('2 ' * (n // 2))
    else:
        print('2 ' * (n // 2 - 1) + '3')

 
def __starting_point():
    main()

__starting_point()

def main():
    n = int(input())
    if n % 2 == 0:
        count = n // 2
        print(count)
        print(' '.join(['2'] * count))
    else:
        count = 1 + (n - 3) // 2
        print(count)
        print(' '.join(['3'] + ['2'] * (count - 1)))

main()


n = int(input())
ans = []

while n > 3:
    n -= 2
    ans.append(2)

ans.append(n)

print(len(ans))
print(' '.join(map(str, ans)))


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

n = int(input())
if n % 2 == 0:
    print(n // 2)
    for i in range(n // 2):
        print(2, end=' ')
else:
    print(n // 2)
    for i in range(n // 2 - 1):
        print(2, end=' ')
    print(3)

n = int(input())
line = []
if n % 2 == 0:
    print(n // 2)
    for i in range(n//2):
        line += [2]
else:
    print(n // 2)
    for i in range(n//2 - 1):
        line += [2]
    line += [3]
print(" ".join(map(str, line)))


n = int(input())
l = []
while n >= 4:
	n -= 2
	l.append(2)
l.append(n)
l = list(map(str, l))
print(len(l))
print(" ".join(l))


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

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

n = int(input())
ans = []
while n > 3:
	ans.append(2)
	n -= 2
ans.append(n)
print(len(ans))
for i in ans:
	print(i, end=" ")


#!/usr/bin/env python3

def main():
    try:
        while True:
            n = int(input())
            ls = [ ]
            if n & 0x1:
                ls.append("3")
                n -= 3
            while n:
                ls.append("2")
                n -= 2
            print(len(ls))
            print(' '.join(ls))

    except EOFError:
        pass

main()


n = int(input())
if n % 2 == 0:
    print(n // 2)
    print("2 " * (n // 2))
else:
    print(n // 2)
    print("2 " * ((n - 3) // 2) + "3")

n = int(input())
print(n // 2)
k = ['2' for i in range(n // 2)]
if (n % 2): k[-1] = '3'
print(' '.join(k))

k=int(input())
if k%2==0:
    print(k//2)
    print(' '.join(['2']*(k//2)))
else:
    print(k//2)
    a=['2']*(k//2-1)
    a.append('3')
    print(' '.join(a))


n = int(input())
res = list()
while n >= 2:
	res.append(2)
	n -= 2
if n == 1:
	res[0] += 1
print(len(res))
print(' '.join(map(str, res)))

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

n=int(input())
counter=0
if n%2==0:
  print(n//2)
  print('2 '*(n//2))
else:
  print(n//2)
  print('2 '*(n//2-1)+'3')

n = int(input())
if n == 2:
    print(1)
    print(2)
elif n % 2 == 0:
    print(n // 2)
    for i in range(n // 2):
        print(2, end=" ")
else:
    print(n // 2)
    n -= 3
    print(3, end= " ")
    for i in range(n // 2):
        print(2, end=" ")

n = int(input())
ans = []
while n > 1:
    if n > 3 or n == 2:
        n -= 2
        ans.append(2)
    else:
        n -= 3
        ans.append(3)
print(len(ans))
print(' '.join(str(i) for i in ans))

a= int(input())
l=[]
while a>3:
    l.append(2)
    a-=2
if a==3:
    l.append(3)
elif a==2:
    l.append(2)

print(len(l))
print(*l)


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


import math,sys,re,itertools,pprint,collections,copy
rs,ri,rai,raf=input,lambda:int(input()),lambda:list(map(int, input().split())),lambda:list(map(float, input().split()))

n = ri()

if n % 2 == 0:
    res = [2] * (n//2)
else:
    k = n - 3
    res = [3] + ([2] * (k//2))

print(len(res))
print(" ".join(map(str, res)))


n = int(input())
print(n//2)
if n % 2 == 0:
    print(*("2" * (n//2)))
else:
    print(*(["2"] * ((n//2)-1)), "3")


n = int(input())
print(n // 2)
if (n % 2 == 1):
    print(3, end=" ")
    n -= 3
while n > 0:
    print(2, end=" ")
    n -= 2


q=int(input())
if q%2==1:
    s=(q-2) // 2+1
else:
    s=q // 2
print(s)
print('2 '*s if q%2==0 else '2 '*(s-1)+'3')