year = int(input('输入年份:'))
niangan_id = {
    1: "甲",
    2: "乙",
    3: "丙",
    4: "丁",
    5: "戊",
    6: "己",
    7: "庚",
    8: "辛",
    9: "壬",
    0: "癸",
}

nianzhi_id = {
    0: "子",
    1: "丑",
    2: "寅",
    3: "卯",
    4: "辰",
    5: "巳",
    6: "午",
    7: "未",
    8: "申",
    9: "酉",
    10: "戌",
    11: "亥",
}

niangan = (year - 3) % 10

# 地支为子的年份
a = [1924, 1936, 1948, 1960, 1972, 1984, 1996, 2008, 2020, 2032, 2044]
b = 0
for i in sorted(a, reverse=True):
    if year >= i:
        b = i
        break
print(niangan_id[niangan] + nianzhi_id[year - b])
# 实际中，人的年龄就那么几十年，记住附近的12的整数，1920，和1980  例如1961-3-1920=38%12 = 2 对应丑