← 返回题目列表

AtCoder · icpc2015summer_day3_j

J. 果冻氧豆

中文机器翻译题面 查看原题

AtCoder 图片原名已被搁置;此后,原始图像取自英语原文,现已完整保存。

Jelly-Oxygen Beans - 原题 PDF
赛事原始英文题册页面
可复制的 PDF 提取文本
Gennady Korotkevich Contest 1
                   Petrozavodsk Training Camp, Day 1, Friday, August 23, 2013
Problem J. Jelly-Oxygen Beans

    Input   le:        job.in
    Output   le:       job.out
    Time limit:        2 seconds
   Memory limit:     256 megabytes

Do you think that eating candies is easy? This is not the case when they are oxygen candies
actually.

As you like everything sweet, you've just bought a fresh pack of N jelly beans. But usual jelly
beans are, of course, not an option. As a part of your desire to taste everything in your life, you've
bought special jelly-oxygen beans, rare and exclusive candies.

Now it came to eating, and you decided to solve the jelly-oxygen beans eating problem in a
mathematical way.

Suppose you want to eat N jelly-oxygen beans during the next M (1 ≤M ≤N) days, eating the
same number of jelly-oxygen beans each day. It might be impossible, however, if M doesn't divide
N. In this case, you want to eat ⌊N/M⌋jelly-oxygen beans each day. The remaining N mod M
jelly-oxygen beans should be divided into M equal smaller parts. If this is possible, you'll eat
exactly one of these parts each day.

How many possible choices of M do you have?

Input

The only line of the input  le contains an integer number N (1 ≤N ≤1012).

Output

Output the number of possible values of M.

Examples

               job.in                              job.out
 5                                    4

Note

The possible values of M in the example are 1 (eat all candies on the only day), 2 (divide a candy
into two equal parts and eat two undivided candies and one of the parts each day), 4 (divide a
candy into four equal parts and eat one undivided candy and one of the parts each day) and 5
(eat one candy each day). Note that M can't be equal to 3, as you can't divide N mod M = 2
candies into M = 3 equal parts.





                                     Page 10 of 10