Full Binary Tree Leaves

Computer Mathematics Easy 2 views
Back to Questions

Problem Description

In a full binary tree, leaves = internal+1. Given internal nodes i, print leaves.

Input Format

One integer i.

Output Format

One integer leaves.

Sample Test Case

Input:
6
Output:
7

Constraints

i>=0

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev