import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger mersenne = new BigInteger("2").pow(Integer.parseInt(sc.next())).subtract(BigInteger.ONE); int cnt = 0; for (String s : mersenne.toString(2).split("")) { if (s.equals("1")) cnt++; } System.out.println(cnt); } }