n = read_line.to_i64.popcount puts (1i64 << n) - 2