#include #include #include #include #include #include #include #include #include using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i < n + 1; i++) #define all(A) A.begin(), A.end() typedef long long ll; double heron(pair start,pair target1,pair target2){ target1.first -= start.first; target1.second -= start.second; target2.first -= start.first; target2.second -= start.second; return abs(target1.first*target2.second-target2.first*target1.second); } int main() { int n; cin >> n; vector> xy(n); rep(i,n){ int x,y; cin >> x >> y; xy[i] = make_pair(x,y); } int ans = 0; rep(i,n-2){ ans += heron(xy[0],xy[i+1],xy[i+2]); } cout << ans << endl; }