ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Неотсортированные > задача:


Bit Strings

Задачи раздела

• Тапшырма 9. Вариант 9
• Тапшырма 9. Варинат 15
• Треугольник2
• Santa Gifts
• Chessboard Pattern
• Two Sets
• Coin Piles
• Apartments
• Bit Strings
• Repetitions
• D. Love-Hate
• Ferris Wheel
• Missing Number
• Weird Algorithm
• Creating Strings
• Josephus Queries
• Increasing Array

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Сложность Альфа


Your task is to calculate the number of bit strings of length n.

For example, if n=3, the correct answer is 8, because the possible bit strings
are 000, 001, 010, 011, 100, 101, 110, and 111.

Input
The only input line has an integer n.
Output
Print the result modulo 109+7.

Constraints
1≤n≤106

Example
Input:
3
Output:
8

Для отправки решений необходимо выполнить вход.

www.contester.ru