LCC/Moose '20 Contest 2 J1 - Predicting Stonks

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 32M

Problem types

Ronald is interested in selling his company's stock to prospective buyers. To convince buyers that his company is reliable, he will send them a letter containing predictions for his stock prices for the next K days. If Ronald predicts the price changes for all K days accurately, they will buy his stock. The price of his stocks will either increase, decrease or stay the same from day to day.

Ronald wants buyers for his stock, but he has no way of knowing how the price of his stocks will change from day to day. Despite this, Ronald has a mischevious plan. He does not plan on sending the same prediction to his prospective buyers, in the hopes that one of his prediction will be correct. However, Ronald is a businessman and not a mathematician, so he has enlisted your help.

What is the minimum number of letters that Ronald has to send out to guaranteed a buyer?

Input Specification

The input will consist of a single integer K (1 \le K \le 19).

Output Specification

Output a single integer, the minimum number of letters Ronald must send out to guaranteed a buyer.

Sample Input


Sample Output



There are no comments at the moment.