import std.stdio, std.string, std.conv, std.range, std.math, std.bigint, std.algorithm, core.bitop; void main() { auto P = readln.strip.to!int; "%s".writefln( popcnt(2^^P - 1) ); }