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

counter = 0

c = list(map(int, input().split(' ')))

for i in range(c[0], c[1] + 1):

  if str(i)[0] != str(i)[4]:

    continue

  if str(i)[1] != str(i)[3]:

    continue

  counter += 1



print(counter)

# optimized version of the same code:

a = list(map(int, input().split()))

counter = 0

for i in range(a[0], a[1] + 1):

  stri = str(i)

  if (stri[0] == stri[4] and stri[1] == stri[3]):

    counter += 1

    

print(counter)
counter = 0
c = list(map(int, input().split(" ")))
for i in range(c[0], c[1] + 1):
    if str(i)[0] != str(i)[4]:
        continue
    if str(i)[1] != str(i)[3]:
        continue
    counter += 1
print(counter)

a = list(map(int, input().split()))
counter = 0
for i in range(a[0], a[1] + 1):
    stri = str(i)
    if stri[0] == stri[4] and stri[1] == stri[3]:
        counter += 1
print(counter)

+a = list(map(int, input().split())) -c = list(map(int, input().split(" "))) -for i in range(c[0], c[1] + 1): -    if str(i)[0] != str(i)[4]: -        continue -    if str(i)[1] != str(i)[3]: -        continue -    counter += 1 +for i in range(a[0], a[1] + 1): +    stri = str(i) +    if stri[0] == stri[4] and stri[1] == stri[3]: +        counter += 1