logo AlgoBeat OnlineJudge
登录 注册

#215469. [GCPC 2025] Labour Laws

内存限制:2048 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

The “Arbeitszeitgesetz” (ArbZG) regulates the work and break times of employees in Germany. According to this law, if an employee works more than hours on a given day, the employee must take a break of at least half an hour during their shift. If they work for more than hours, their break must be at least minutes. Additionally, working for more than hours on a day is strictly forbidden.

Alexander works at his company’s HR department. As the working hours at his company are very flexible, the employees are allowed to work as many hours or as few as they want (within the legal constraints of course). The monthly salary for each employee thus depends on the time spent working. Therefore, one of Alexander’s monthly tasks is to collect the times each employee has worked on any given day, so that he can calculate and pay out the employees salaries every month.

Unfortunately, today one of his colleagues forgot to record her lunch break and cannot remember how much time she spent on her break. As Alexander does not want to put his colleague at a disadvantage, he wants to use the legally required minimum break time for his calculations.

While calculating the total time his coworker spent at work is easy, correctly calculating the legally required minimum break time can be tricky. Can you help Alexander determine the minimum time his coworker must have spent at lunch today? Note that the time spent at work is the time spent working plus the time spent in break.

输入格式

The input consists of:

  • One line with an integer (), the number of minutes spent at work today.

输出格式

Output a single non-negative integer, the minimum number of minutes spent in break to make the work time legal.

样例

样例输入 1

495

样例输出 1

30

样例输入 2

360

样例输出 2

0

样例输入 3

540

样例输出 3

30

样例输入 4

0

样例输出 4

0