/*
* Copyright (c) 2014, 烟台大学计算机学院
* All rights reserved.
* 文件名称 :test.cpp
* 作 者 :贺利坚
* 完成日期 :2014年10月11号
* 版 本 号 :v1.0
*
* 问题描述 :计算函数的值:当x>=1时,y=x-1,否则,y=-x+1
* 输入描述 :一个整数x
* 程序输出 :对应的y值
*/
#include <iostream>
using namespace std;
int main()
{
int x,y;
cin>>x;
if(x>=1) y=x-1;
else y=-x+1;
cout << "y=" <<y<< endl;
return 0;
}