for each(c in readline(v=0))print(v=[v*v,v/2,v+1][eval(1+c+1)])