Python
n=[]
s=int(input())
sm=0
while s!='':
n.append(int(s))
if int(s) % 10 == 2:
sm+=int(s)
s=input()
print(n)
print(sm)
Python
n=[]
s=int(input())
sm=0
while s!='':
n.append(int(s))
if int(s) % 10 == 2:
sm+=int(s)
s=input()
print(n)
print(sm)