from datetime import datetime import math Y=input() def calcAge(birthdayStr): if not (birthdayStr.isdigit() and len(birthdayStr)==8): return -1 dStr = ("20170623") return math.floor((int(dStr)-int(birthdayStr))/10000) print(calcAge(Y+'0101'))