#coding:utf-8 def pow(a,n): res=1 while n: if n%2==1: res*=a a*=a n/=2 return res p=input() ans=pow(2,p)-1 ans_bin=bin(ans) prime=0 for i in ans_bin[2:]: prime+=int(i) print prime