• [K] Play or Not Play

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • To chat or not to chat, it is a question. Zero is so angry because when he plays LOL, there is nobody plays with him. So, zero wants to punish them.
    Now, the rule is that there are almost N men, everybody can play with others. But, if one of them who plays with M people, these M people can not play with each other
    Now we agreed that one plays with another to be a playing relationship.
    For example, if man A plays with man B, man C, man D, then man B can not play with man C and man D, of course the same as man C and man D. And there are three playing relationships.
    There are N people, can you get the maximum number of playing relationships.

  • 输入
  • Input until EOF.
    Each line contains one integer N(1 < N <= 10^9) means the number of people.
  • 输出
  • One line one output, print the maximum number of playting relationships.
  • 样例输入
  • 2
    3
    4
  • 样例输出
  • 1
    2
    4
    
  • 提示
  • 来源
  • hungar
  • 操作

显示春菜