Let's sell Jeongjeheon!

No attempts yetTime limit5sMemory limit128 MB

Problem

In the Anam valley there is a well known pharmaceutical company called ALPS (Anam Lotated Pill Station). It is famous because every drug it makes uses only two ingredients, soju and beer. Jaeheon, the president of ALPS, sells his drugs believing that the right mixture of soju and beer cures any illness.

At the start of the new year, after a heavy round of his own medicine, Jaeheon gave the company these resolutions.

  1. Every flask and beaker used in the company must have a capacity of the form 1/n1/n, where nn is a positive integer.
  2. Every drug, whether it is for sale or for storage, must fill its flask or beaker completely.
  3. Three times a week, shout the company name toward the east.

The staff had been drinking the same medicine, so nobody complained and everyone agreed to follow the orders.

One day a customer named Hongjun came looking for the company's miraculous medicine and asked for Jeongjeheon, the finely refined drug that ALPS is proud of. Under the resolutions every drug sits in a container whose capacity is the reciprocal of a positive integer, filled to the brim, and Jeongjeheon is in a 1/n1/n beaker.

Jaeheon did not want to hand over the whole 1/n1/n of Jeongjeheon. He decided to split it between a flask of capacity 1/x1/x and a flask of capacity 1/y1/y, give the 1/x1/x flask to Hongjun and keep the 1/y1/y flask in the company. But the 1/x1/x flask is the one for sale and the 1/y1/y flask is the one for storage. By the resolutions both flasks have to be completely full of Jeongjeheon.

While picking the two flasks, Jaeheon stopped selling anything and started wondering how many ways there are to split Jeongjeheon into two flasks without breaking the resolutions. Answer his question quickly so that Hongjun can finally buy his Jeongjeheon.

Input

The input consists of several lines, one test case per line. Each line gives the capacity of Jeongjeheon in the form 1/n, with 1n100001 \le n \le 10000. A line contains no whitespace. Read until the end of the input.

Output

For each test case, print on its own line the number of ways to split Jeongjeheon into the two flasks. That is, print the number of pairs {x,y}\{x, y\} of positive integers with 1x+1y=1n\frac{1}{x} + \frac{1}{y} = \frac{1}{n}. The pairs {x,y}\{x, y\} and {y,x}\{y, x\} differ only in order and count as one.