Rise of Shadows
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
64bit IO Format: %lld

题目描述

Azeroth is a world full of fantasy. In Azeroth, there are hours in a day and minutes in an hour.

You found a clock made from Azeroth. The clock has two hands --- the hour hand and the minute hand. The two hands point to the same direction at the start of a day. Either hand rotates at a constant speed. The hour hand goes around a full circle in hours and the minute hand goes around a full circle in minutes. Surprisingly, it is night in Azeroth if and only if the angle between the two hands is less than or equal to .
Now you're wondering, given , how many integral moments (i.e., integer minutes since the start of the day) are there, such that the angle between the two hands is less than or equal to .

输入描述:

The only line of the input contains three integers   and  , representing the number of hours in a day and the number of minutes in an hour, and the limit of the angle in radians, respectively.

输出描述:

Print an integer representing the answer.
示例1

输入

复制
5 5 4

输出

复制
9
示例2

输入

复制
3 5 1

输出

复制
3