'''
@Author: your name
@Date: 2020-07-08 10:53:48
@LastEditTime: 2020-07-08 11:42:41
@LastEditors: Please set LastEditors
@Description: In User Settings Edit
@FilePath: \vscode_py\day4.py
'''
# Question 14:
# 统计大写字母和小写字母的数量
def Q14():
low=0
up=0
str_l=input()
for i in str_l:
if i.islower():
low+=1

elif i.isupper():
up+=1
else:
continue
print("UPPER CASE :{}\nUPPER CASE :{}".format(up,low))


# Question15:
# 输入一个数字 a,计算 a+aa+aaa+aaaa
def Q15():
sum=0
tmp=str()
a=input() # a是一个str类型
# print(a)
for i in range(4):
tmp+=str(a)
sum+=int(tmp)
print(sum)



if __name__ == "__main__":
# Q14()

Q15()