
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')


# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)



# slower version:

res = []

while True:

    s = eval(input())

    if s == '0':

        break



    res.append(sum([int(x) for x in s]))



for e in res:

    print(e)

# optimized version of the same code:

def sum_of_numbers(n):

    '''

    (* int -> int *)

    '''

    res = [int(n) for n in list(str(n))]

    

    return sum(res)



if __name__ == "__main__":

    while True:

        n = eval(input())

        if n == '0':

            break

        print((sum_of_numbers(n)))

res = []
while True:
    s = eval(input())
    if s == "0":
        break
    res.append(sum([int(x) for x in s]))
for e in res:
    print(e)

def sum_of_numbers(n):
    """
    (* int -> int *)
    """
    res = [int(n) for n in list(str(n))]
    return sum(res)


if __name__ == "__main__":
    while True:
        n = eval(input())
        if n == "0":
            break
        print((sum_of_numbers(n)))

-res = [] -while True: -    s = eval(input()) -    if s == "0": -        break -    res.append(sum([int(x) for x in s])) -for e in res: -    print(e) +def sum_of_numbers(n): +    """ +    (* int -> int *) +    """ +    res = [int(n) for n in list(str(n))] +    return sum(res) + + +if __name__ == "__main__": +    while True: +        n = eval(input()) +        if n == "0": +            break +        print((sum_of_numbers(n)))