# 读取输入的整数
a = int(input())

# 计算十位数字
# 步骤1: 取绝对值,步骤2: 整除10去掉个位,步骤3: 对10取余得到十位数字
tens_digit = (abs(a) // 10) % 10

# 输出结果
print(tens_digit)