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

# Problem https://atcoder.jp/contests/abc053/tasks/abc053_b

# Python 1st Try

import copy





class Problem:

    def __init__(self, stringdata):

        self.stringdata = stringdata



    def solver(self):

        strcont = copy.copy(self.stringdata)

        result = 0

        rightposition = 0

        leftposition = len(strcont)

        j = 0

        while True:

            if strcont[j] == 'A':

                rightposition = j

                break

            else:

                j = j + 1

        j = leftposition - 1

        while True:

            if strcont[j] == 'Z':

                leftposition = j

                break

            else:

                j = j - 1



        result = leftposition - rightposition + 1

        return result





if __name__ == "__main__":

    s = eval(input())

    print(("{}".format(Problem(s).solver())))


# optimized version of the same code:

# Problem https://atcoder.jp/contests/abc053/tasks/abc053_b

# Python 2nd Try





def solver(string):

    result = 200000

    aposi = 0

    zposi = len(string)

    for j in range(0, len(string), 1):

        if string[j] == 'A':

            aposi = j

            break

    for j in range(len(string)-1, -1, -1):

        if string[j] == 'Z':

            zposi = j

            break

    result = zposi - aposi + 1

    return result





if __name__ == "__main__":

    s = eval(input())

    print(('{}'.format(solver(s))))

# Problem https://atcoder.jp/contests/abc053/tasks/abc053_b
# Python 1st Try
import copy


class Problem:
    def __init__(self, stringdata):
        self.stringdata = stringdata

    def solver(self):
        strcont = copy.copy(self.stringdata)
        result = 0
        rightposition = 0
        leftposition = len(strcont)
        j = 0
        while True:
            if strcont[j] == "A":
                rightposition = j
                break
            else:
                j = j + 1
        j = leftposition - 1
        while True:
            if strcont[j] == "Z":
                leftposition = j
                break
            else:
                j = j - 1
        result = leftposition - rightposition + 1
        return result


if __name__ == "__main__":
    s = eval(input())
    print(("{}".format(Problem(s).solver())))

# Problem https://atcoder.jp/contests/abc053/tasks/abc053_b
# Python 2nd Try
def solver(string):
    result = 200000
    aposi = 0
    zposi = len(string)
    for j in range(0, len(string), 1):
        if string[j] == "A":
            aposi = j
            break
    for j in range(len(string) - 1, -1, -1):
        if string[j] == "Z":
            zposi = j
            break
    result = zposi - aposi + 1
    return result


if __name__ == "__main__":
    s = eval(input())
    print(("{}".format(solver(s))))

-# Python 1st Try -import copy - - -class Problem: -    def __init__(self, stringdata): -        self.stringdata = stringdata - -    def solver(self): -        strcont = copy.copy(self.stringdata) -        result = 0 -        rightposition = 0 -        leftposition = len(strcont) -        j = 0 -        while True: -            if strcont[j] == "A": -                rightposition = j -                break -            else: -                j = j + 1 -        j = leftposition - 1 -        while True: -            if strcont[j] == "Z": -                leftposition = j -                break -            else: -                j = j - 1 -        result = leftposition - rightposition + 1 -        return result +# Python 2nd Try +def solver(string): +    result = 200000 +    aposi = 0 +    zposi = len(string) +    for j in range(0, len(string), 1): +        if string[j] == "A": +            aposi = j +            break +    for j in range(len(string) - 1, -1, -1): +        if string[j] == "Z": +            zposi = j +            break +    result = zposi - aposi + 1 +    return result -    print(("{}".format(Problem(s).solver()))) +    print(("{}".format(solver(s))))