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

N = int(eval(input()))

mem = [[0]*10 for i in range(10)]



for i in range(1,N+1):

    a = int(str(i)[0])

    b = int(str(i)[-1])

    mem[a][b] += 1



ans = 0

for i in range(1,N+1):

    a = int(str(i)[0])

    b = int(str(i)[-1])

    ans += mem[b][a]

print(ans)

# optimized version of the same code:

N = int(eval(input()))



d = [[0]*10 for i in range(10)]

for n in range(1,N+1):

    s = str(n)

    d[int(s[0])][int(s[-1])] += 1

ans = 0

for i in range(10):

    for j in range(10):

        ans += d[i][j] * d[j][i]

print(ans)
N = int(eval(input()))
mem = [[0] * 10 for i in range(10)]
for i in range(1, N + 1):
    a = int(str(i)[0])
    b = int(str(i)[-1])
    mem[a][b] += 1
ans = 0
for i in range(1, N + 1):
    a = int(str(i)[0])
    b = int(str(i)[-1])
    ans += mem[b][a]
print(ans)

N = int(eval(input()))
d = [[0] * 10 for i in range(10)]
for n in range(1, N + 1):
    s = str(n)
    d[int(s[0])][int(s[-1])] += 1
ans = 0
for i in range(10):
    for j in range(10):
        ans += d[i][j] * d[j][i]
print(ans)

-mem = [[0] * 10 for i in range(10)] -for i in range(1, N + 1): -    a = int(str(i)[0]) -    b = int(str(i)[-1]) -    mem[a][b] += 1 +d = [[0] * 10 for i in range(10)] +for n in range(1, N + 1): +    s = str(n) +    d[int(s[0])][int(s[-1])] += 1 -for i in range(1, N + 1): -    a = int(str(i)[0]) -    b = int(str(i)[-1]) -    ans += mem[b][a] +for i in range(10): +    for j in range(10): +        ans += d[i][j] * d[j][i]