跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2693. Unsolvable

    ID: 2699 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 7 上传者: 标签>数学数论提高难度共享题库Codeforces英文题面题目来源题面语言

Unsolvable

题目描述

E. Unsolvable
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Consider the following equation:

where sign [a] represents the integer part of number a.

Let's find all integer z (z>0), for which this equation is unsolvable in positive integers. The phrase "unsolvable in positive integers" means that there are no such positive integers x and y (x,y>0), for which the given above equation holds.

Let's write out all such z in the increasing order: z1,z2,z3, and so on (zi<zi+1). Your task is: given the number n, find the number zn.

Input

The first line contains a single integer n (1≤n≤40).

Output

Print a single integer − the number zn modulo 1000000007 (109+7). It is guaranteed that the answer exists.

Examples
Input
1
Output
1
Input
2
Output
3
Input
3
Output
15

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2358 题。保留原作者与原赛事署名。