CF331B2 Shave Beaver!

Description

The Smart Beaver has recently designed and built an innovative nanotechnologic all-purpose beaver mass shaving machine, "Beavershave 5000". Beavershave 5000 can shave beavers by families! How does it work? Very easily! There are $ n $ beavers, each of them has a unique id from 1 to $ n $ . Consider a permutation $ a_{1},a_{2},...,a_{n} $ of $ n $ these beavers. Beavershave 5000 needs one session to shave beavers with ids from $ x $ to $ y $ (inclusive) if and only if there are such indices $ i_{1}

Input Format

The first line contains integer $ n $ — the total number of beavers, $ 2

Output Format

For each query with $ p_{i}=1 $ , print the minimum number of Beavershave 5000 sessions.